From 3f4db26a2bc59147447b0c038ce7963c2c7ab2ba Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Fri, 10 Jan 2014 16:02:23 +0800 Subject: [PATCH 01/69] Fixed bugs --- cocos/gui/UIButton.cpp | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/cocos/gui/UIButton.cpp b/cocos/gui/UIButton.cpp index 5a6a2dc54f..82ed33dfec 100644 --- a/cocos/gui/UIButton.cpp +++ b/cocos/gui/UIButton.cpp @@ -366,8 +366,7 @@ void Button::onPressStateChangedToNormal() else { _buttonNormalRenderer->stopAllActions(); - Action *zoomAction = ScaleTo::create(0.05f, _normalTextureScaleXInSize, _normalTextureScaleYInSize); - _buttonNormalRenderer->runAction(zoomAction); + _buttonNormalRenderer->setScale(_normalTextureScaleXInSize, _normalTextureScaleYInSize); } } @@ -393,8 +392,7 @@ void Button::onPressStateChangedToPressed() _buttonClickedRenderer->setVisible(true); _buttonDisableRenderer->setVisible(false); _buttonNormalRenderer->stopAllActions(); - Action *zoomAction = ScaleTo::create(0.05f, _pressedTextureScaleXInSize + 0.1f, _pressedTextureScaleYInSize + 0.1f); - _buttonNormalRenderer->runAction(zoomAction); + _buttonNormalRenderer->setScale(_normalTextureScaleXInSize + 0.1f, _normalTextureScaleYInSize + 0.1f); } } From 4e2d6143afbff47eb2d7fad7023e4b6544273b1a Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Fri, 10 Jan 2014 17:02:16 +0800 Subject: [PATCH 02/69] Fixed bug of reader --- .../cocostudio/CCSGUIReader.cpp | 28 ++++++++++++------- 1 file changed, 18 insertions(+), 10 deletions(-) diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index 349bba5dfe..016ddeafb8 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -558,12 +558,16 @@ void WidgetPropertiesReader0250::setPropsForLabelFromJsonDictionary(Widget*widge { label->setFontName(DICTOOL->getStringValue_json(options, "fontName")); } - bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); - bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); - if (aw && ah) + bool handleDimensions = DICTOOL->getBooleanValue_json(options, "handleDimensions"); + if (handleDimensions) { - Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); - label->setTextAreaSize(size); + bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); + bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); + if (aw && ah) + { + Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); + label->setTextAreaSize(size); + } } bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment"); if (ha) @@ -1449,12 +1453,16 @@ void WidgetPropertiesReader0300::setPropsForLabelFromJsonDictionary(Widget*widge { label->setFontName(DICTOOL->getStringValue_json(options, "fontName")); } - bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); - bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); - if (aw && ah) + bool handleDimensions = DICTOOL->getBooleanValue_json(options, "handleDimensions"); + if (handleDimensions) { - Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); - label->setTextAreaSize(size); + bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); + bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); + if (aw && ah) + { + Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); + label->setTextAreaSize(size); + } } bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment"); if (ha) From fdfa84ce20c04dac3f75b359a66a587ff53511ca Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Tue, 14 Jan 2014 14:37:31 +0800 Subject: [PATCH 03/69] Fixed bugs. --- .../cocostudio/CCSGUIReader.cpp | 28 +++++++------------ 1 file changed, 10 insertions(+), 18 deletions(-) diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index 016ddeafb8..349bba5dfe 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -558,16 +558,12 @@ void WidgetPropertiesReader0250::setPropsForLabelFromJsonDictionary(Widget*widge { label->setFontName(DICTOOL->getStringValue_json(options, "fontName")); } - bool handleDimensions = DICTOOL->getBooleanValue_json(options, "handleDimensions"); - if (handleDimensions) + bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); + bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); + if (aw && ah) { - bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); - bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); - if (aw && ah) - { - Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); - label->setTextAreaSize(size); - } + Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); + label->setTextAreaSize(size); } bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment"); if (ha) @@ -1453,16 +1449,12 @@ void WidgetPropertiesReader0300::setPropsForLabelFromJsonDictionary(Widget*widge { label->setFontName(DICTOOL->getStringValue_json(options, "fontName")); } - bool handleDimensions = DICTOOL->getBooleanValue_json(options, "handleDimensions"); - if (handleDimensions) + bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); + bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); + if (aw && ah) { - bool aw = DICTOOL->checkObjectExist_json(options, "areaWidth"); - bool ah = DICTOOL->checkObjectExist_json(options, "areaHeight"); - if (aw && ah) - { - Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); - label->setTextAreaSize(size); - } + Size size = Size(DICTOOL->getFloatValue_json(options, "areaWidth"),DICTOOL->getFloatValue_json(options,"areaHeight")); + label->setTextAreaSize(size); } bool ha = DICTOOL->checkObjectExist_json(options, "hAlignment"); if (ha) From fdf5a4c0b530242be7a29259bc376a010afbb236 Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Wed, 15 Jan 2014 20:06:49 +0800 Subject: [PATCH 04/69] Fixed bug of reader. --- cocos/editor-support/cocostudio/CCSGUIReader.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/editor-support/cocostudio/CCSGUIReader.cpp b/cocos/editor-support/cocostudio/CCSGUIReader.cpp index 349bba5dfe..ac3dc907ab 100644 --- a/cocos/editor-support/cocostudio/CCSGUIReader.cpp +++ b/cocos/editor-support/cocostudio/CCSGUIReader.cpp @@ -474,7 +474,7 @@ void WidgetPropertiesReader0250::setPropsForCheckBoxFromJsonDictionary(Widget*wi { checkBox->loadTextures(backGroundFileName_tp, backGroundSelectedFileName_tp, frontCrossFileName_tp,backGroundDisabledFileName_tp,frontCrossDisabledFileName_tp); } - + checkBox->setSelectedState(DICTOOL->getBooleanValue_json(options, "selectedState")); setColorPropsForWidgetFromJsonDictionary(widget,options); } @@ -1364,7 +1364,7 @@ void WidgetPropertiesReader0300::setPropsForCheckBoxFromJsonDictionary(Widget*wi default: break; } - + checkBox->setSelectedState(DICTOOL->getBooleanValue_json(options, "selectedState")); setColorPropsForWidgetFromJsonDictionary(widget,options); } From bea46fa2908335f58b4f803fb849626d88795e7a Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Fri, 17 Jan 2014 13:10:04 +0800 Subject: [PATCH 05/69] Add clone method to LayoutParameter --- cocos/gui/UILayoutParameter.cpp | 93 +++++++++++++++++++++++++-------- cocos/gui/UILayoutParameter.h | 53 +++++++++++-------- cocos/gui/UILoadingBar.cpp | 1 + cocos/gui/UIWidget.cpp | 5 ++ 4 files changed, 108 insertions(+), 44 deletions(-) diff --git a/cocos/gui/UILayoutParameter.cpp b/cocos/gui/UILayoutParameter.cpp index d0a98f4d0d..bbde56f9e3 100644 --- a/cocos/gui/UILayoutParameter.cpp +++ b/cocos/gui/UILayoutParameter.cpp @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2013-2014 Chukong Technologies 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. -****************************************************************************/ + Copyright (c) 2013-2014 Chukong Technologies 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. + ****************************************************************************/ #include "gui/UILayoutParameter.h" #include "gui/UILayout.h" @@ -56,6 +56,23 @@ LayoutParameterType LayoutParameter::getLayoutType() const { return _layoutParameterType; } + +LayoutParameter* LayoutParameter::clone() +{ + LayoutParameter* clonedParameter = createCloneInstance(); + clonedParameter->copyProperties(this); + return clonedParameter; +} + +LayoutParameter* LayoutParameter::createCloneInstance() +{ + return LayoutParameter::create(); +} + +void LayoutParameter::copyProperties(LayoutParameter *model) +{ + _margin = model->_margin; +} LinearLayoutParameter* LinearLayoutParameter::create() { @@ -78,6 +95,21 @@ LinearGravity LinearLayoutParameter::getGravity() const { return _linearGravity; } + +LayoutParameter* LinearLayoutParameter::createCloneInstance() +{ + return LinearLayoutParameter::create(); +} + +void LinearLayoutParameter::copyProperties(LayoutParameter *model) +{ + LayoutParameter::copyProperties(model); + LinearLayoutParameter* parameter = dynamic_cast(model); + if (parameter) + { + setGravity(parameter->_linearGravity); + } +} RelativeLayoutParameter* RelativeLayoutParameter::create() { @@ -120,6 +152,23 @@ const char* RelativeLayoutParameter::getRelativeName() const { return _relativeLayoutName.c_str(); } + +LayoutParameter* RelativeLayoutParameter::createCloneInstance() +{ + return RelativeLayoutParameter::create(); +} + +void RelativeLayoutParameter::copyProperties(LayoutParameter *model) +{ + LayoutParameter::copyProperties(model); + RelativeLayoutParameter* parameter = dynamic_cast(model); + if (parameter) + { + setAlign(parameter->_relativeAlign); + setRelativeName(parameter->_relativeLayoutName.c_str()); + setRelativeToWidgetName(parameter->_relativeWidgetName.c_str()); + } +} } diff --git a/cocos/gui/UILayoutParameter.h b/cocos/gui/UILayoutParameter.h index 9065a16176..e3ad428243 100644 --- a/cocos/gui/UILayoutParameter.h +++ b/cocos/gui/UILayoutParameter.h @@ -1,26 +1,26 @@ /**************************************************************************** -Copyright (c) 2013-2014 Chukong Technologies 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. -****************************************************************************/ + Copyright (c) 2013-2014 Chukong Technologies 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. + ****************************************************************************/ #ifndef __LAYOUTPARMETER_H__ #define __LAYOUTPARMETER_H__ @@ -86,6 +86,10 @@ public: * @return LayoutParameterType */ LayoutParameterType getLayoutType() const; + + LayoutParameter* clone(); + virtual LayoutParameter* createCloneInstance(); + virtual void copyProperties(LayoutParameter* model); protected: Margin _margin; LayoutParameterType _layoutParameterType; @@ -130,6 +134,8 @@ public: * @return LinearGravity */ LinearGravity getGravity() const; + virtual LayoutParameter* createCloneInstance(); + virtual void copyProperties(LayoutParameter* model); protected: LinearGravity _linearGravity; }; @@ -202,6 +208,9 @@ public: * @return name */ const char* getRelativeName() const; + + virtual LayoutParameter* createCloneInstance(); + virtual void copyProperties(LayoutParameter* model); protected: RelativeAlign _relativeAlign; std::string _relativeWidgetName; diff --git a/cocos/gui/UILoadingBar.cpp b/cocos/gui/UILoadingBar.cpp index b561c3fd7c..15ade85aef 100644 --- a/cocos/gui/UILoadingBar.cpp +++ b/cocos/gui/UILoadingBar.cpp @@ -334,6 +334,7 @@ void LoadingBar::copySpecialProperties(Widget *widget) loadTexture(loadingBar->_textureFile.c_str(), loadingBar->_renderBarTexType); setCapInsets(loadingBar->_capInsets); setPercent(loadingBar->_percent); + setDirection(loadingBar->_barType); } } diff --git a/cocos/gui/UIWidget.cpp b/cocos/gui/UIWidget.cpp index e28f4d8db0..c475a1c409 100644 --- a/cocos/gui/UIWidget.cpp +++ b/cocos/gui/UIWidget.cpp @@ -1065,6 +1065,11 @@ void Widget::copyProperties(Widget *widget) setOpacity(widget->getOpacity()); setCascadeOpacityEnabled(widget->isCascadeOpacityEnabled()); setCascadeColorEnabled(widget->isCascadeColorEnabled()); + Map& layoutParameterDic = widget->_layoutParameterDictionary; + for (auto iter = layoutParameterDic.begin(); iter != layoutParameterDic.end(); ++iter) + { + setLayoutParameter(iter->second->clone()); + } onSizeChanged(); } From f33064a2fcd2d38f7b882c227fafab2337ea5a8d Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Fri, 17 Jan 2014 15:22:59 +0800 Subject: [PATCH 06/69] Fixed bug of label --- cocos/gui/UIText.cpp | 18 +++++------------- cocos/gui/UIText.h | 1 - 2 files changed, 5 insertions(+), 14 deletions(-) diff --git a/cocos/gui/UIText.cpp b/cocos/gui/UIText.cpp index 1899d7439a..13b014fe66 100644 --- a/cocos/gui/UIText.cpp +++ b/cocos/gui/UIText.cpp @@ -127,14 +127,11 @@ void Text::setTextVerticalAlignment(TextVAlignment alignment) void Text::setTouchScaleChangeEnabled(bool enable) { _touchScaleChangeEnabled = enable; - _normalScaleValueX = getScaleX(); - _normalScaleValueY = getScaleY(); } void Text::setScale(float fScale) { Widget::setScale(fScale); - _normalScaleValueX = _normalScaleValueY = fScale; } void Text::setScaleX(float fScaleX) @@ -158,7 +155,7 @@ void Text::onPressStateChangedToNormal() { return; } - clickScale(_normalScaleValueX, _normalScaleValueY); + _labelRenderer->setScale(_normalScaleValueX, _normalScaleValueY); } void Text::onPressStateChangedToPressed() @@ -167,9 +164,7 @@ void Text::onPressStateChangedToPressed() { return; } - _normalScaleValueX = getScaleX(); - _normalScaleValueY = getScaleY(); - clickScale(_normalScaleValueX + _onSelectedScaleOffset, _normalScaleValueY + _onSelectedScaleOffset); + _labelRenderer->setScale(_normalScaleValueX + _onSelectedScaleOffset, _normalScaleValueY + _onSelectedScaleOffset); } void Text::onPressStateChangedToDisabled() @@ -177,12 +172,6 @@ void Text::onPressStateChangedToDisabled() } -void Text::clickScale(float scaleX, float scaleY) -{ - setScaleX(scaleX); - setScaleY(scaleY); -} - void Text::setFlipX(bool flipX) { _labelRenderer->setFlippedX(flipX); @@ -231,6 +220,7 @@ void Text::labelScaleChangedWithSize() { _labelRenderer->setScale(1.0f); _size = _labelRenderer->getContentSize(); + _normalScaleValueX = _normalScaleValueY = 1.0f; } else { @@ -244,6 +234,8 @@ void Text::labelScaleChangedWithSize() float scaleY = _size.height / textureSize.height; _labelRenderer->setScaleX(scaleX); _labelRenderer->setScaleY(scaleY); + _normalScaleValueX = scaleX; + _normalScaleValueY = scaleY; } } diff --git a/cocos/gui/UIText.h b/cocos/gui/UIText.h index e41b01d321..44d558151a 100644 --- a/cocos/gui/UIText.h +++ b/cocos/gui/UIText.h @@ -166,7 +166,6 @@ protected: virtual void onPressStateChangedToPressed() override; virtual void onPressStateChangedToDisabled() override; virtual void onSizeChanged() override; - void clickScale(float scaleX, float scaleY); void labelScaleChangedWithSize(); virtual Widget* createCloneInstance() override; virtual void copySpecialProperties(Widget* model) override; From f10e1ee04cb3900665e42beb9b44172d724665c6 Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Mon, 20 Jan 2014 13:38:13 +0800 Subject: [PATCH 07/69] optimize scissor clipping --- cocos/gui/UILayout.cpp | 130 ++++++++++++++++++++++------------------- cocos/gui/UILayout.h | 1 + 2 files changed, 70 insertions(+), 61 deletions(-) diff --git a/cocos/gui/UILayout.cpp b/cocos/gui/UILayout.cpp index 8a64ad7ed4..697c89a243 100644 --- a/cocos/gui/UILayout.cpp +++ b/cocos/gui/UILayout.cpp @@ -67,6 +67,7 @@ _scissorRectDirty(false), _clippingRect(Rect::ZERO), _clippingParent(nullptr), _doLayoutDirty(true), +_clippingRectDirty(true), _currentStencilEnabled(GL_FALSE), _currentStencilWriteMask(~0), _currentStencilFunc(GL_ALWAYS), @@ -95,6 +96,8 @@ void Layout::onEnter() { _clippingStencil->onEnter(); } + _doLayoutDirty = true; + _clippingRectDirty = true; } void Layout::onExit() @@ -421,79 +424,83 @@ void Layout::setStencilClippingSize(const Size &size) const Rect& Layout::getClippingRect() { - Point worldPos = convertToWorldSpace(Point::ZERO); - AffineTransform t = getNodeToWorldAffineTransform(); - float scissorWidth = _size.width*t.a; - float scissorHeight = _size.height*t.d; - Rect parentClippingRect; - Layout* parent = this; - bool firstClippingParentFounded = false; - while (parent) + if (_clippingRectDirty) { - parent = dynamic_cast(parent->getParent()); - if(parent) + Point worldPos = convertToWorldSpace(Point::ZERO); + AffineTransform t = getNodeToWorldAffineTransform(); + float scissorWidth = _size.width*t.a; + float scissorHeight = _size.height*t.d; + Rect parentClippingRect; + Layout* parent = this; + bool firstClippingParentFounded = false; + while (parent) { - if (parent->isClippingEnabled()) + parent = dynamic_cast(parent->getParent()); + if(parent) { - if (!firstClippingParentFounded) + if (parent->isClippingEnabled()) { - _clippingParent = parent; - firstClippingParentFounded = true; - break; + if (!firstClippingParentFounded) + { + _clippingParent = parent; + firstClippingParentFounded = true; + break; + } } } } - } - - if (_clippingParent) - { - parentClippingRect = _clippingParent->getClippingRect(); - float finalX = worldPos.x - (scissorWidth * _anchorPoint.x); - float finalY = worldPos.y - (scissorHeight * _anchorPoint.y); - float finalWidth = scissorWidth; - float finalHeight = scissorHeight; - float leftOffset = worldPos.x - parentClippingRect.origin.x; - if (leftOffset < 0.0f) + if (_clippingParent) { - finalX = parentClippingRect.origin.x; - finalWidth += leftOffset; + parentClippingRect = _clippingParent->getClippingRect(); + float finalX = worldPos.x - (scissorWidth * _anchorPoint.x); + float finalY = worldPos.y - (scissorHeight * _anchorPoint.y); + float finalWidth = scissorWidth; + float finalHeight = scissorHeight; + + float leftOffset = worldPos.x - parentClippingRect.origin.x; + if (leftOffset < 0.0f) + { + finalX = parentClippingRect.origin.x; + finalWidth += leftOffset; + } + float rightOffset = (worldPos.x + scissorWidth) - (parentClippingRect.origin.x + parentClippingRect.size.width); + if (rightOffset > 0.0f) + { + finalWidth -= rightOffset; + } + float topOffset = (worldPos.y + scissorHeight) - (parentClippingRect.origin.y + parentClippingRect.size.height); + if (topOffset > 0.0f) + { + finalHeight -= topOffset; + } + float bottomOffset = worldPos.y - parentClippingRect.origin.y; + if (bottomOffset < 0.0f) + { + finalY = parentClippingRect.origin.x; + finalHeight += bottomOffset; + } + if (finalWidth < 0.0f) + { + finalWidth = 0.0f; + } + if (finalHeight < 0.0f) + { + finalHeight = 0.0f; + } + _clippingRect.origin.x = finalX; + _clippingRect.origin.y = finalY; + _clippingRect.size.width = finalWidth; + _clippingRect.size.height = finalHeight; } - float rightOffset = (worldPos.x + scissorWidth) - (parentClippingRect.origin.x + parentClippingRect.size.width); - if (rightOffset > 0.0f) + else { - finalWidth -= rightOffset; + _clippingRect.origin.x = worldPos.x - (scissorWidth * _anchorPoint.x); + _clippingRect.origin.y = worldPos.y - (scissorHeight * _anchorPoint.y); + _clippingRect.size.width = scissorWidth; + _clippingRect.size.height = scissorHeight; } - float topOffset = (worldPos.y + scissorHeight) - (parentClippingRect.origin.y + parentClippingRect.size.height); - if (topOffset > 0.0f) - { - finalHeight -= topOffset; - } - float bottomOffset = worldPos.y - parentClippingRect.origin.y; - if (bottomOffset < 0.0f) - { - finalY = parentClippingRect.origin.x; - finalHeight += bottomOffset; - } - if (finalWidth < 0.0f) - { - finalWidth = 0.0f; - } - if (finalHeight < 0.0f) - { - finalHeight = 0.0f; - } - _clippingRect.origin.x = finalX; - _clippingRect.origin.y = finalY; - _clippingRect.size.width = finalWidth; - _clippingRect.size.height = finalHeight; - } - else - { - _clippingRect.origin.x = worldPos.x - (scissorWidth * _anchorPoint.x); - _clippingRect.origin.y = worldPos.y - (scissorHeight * _anchorPoint.y); - _clippingRect.size.width = scissorWidth; - _clippingRect.size.height = scissorHeight; + _clippingRectDirty = false; } return _clippingRect; } @@ -504,6 +511,7 @@ void Layout::onSizeChanged() setContentSize(_size); setStencilClippingSize(_size); _doLayoutDirty = true; + _clippingRectDirty = true; if (_backGroundImage) { _backGroundImage->setPosition(Point(_size.width/2.0f, _size.height/2.0f)); diff --git a/cocos/gui/UILayout.h b/cocos/gui/UILayout.h index 327707d7c8..13f7ac1e36 100644 --- a/cocos/gui/UILayout.h +++ b/cocos/gui/UILayout.h @@ -273,6 +273,7 @@ protected: Rect _clippingRect; Layout* _clippingParent; bool _doLayoutDirty; + bool _clippingRectDirty; //clipping From 223857398d4bd16de4087a9b5181f2bd239998bf Mon Sep 17 00:00:00 2001 From: CaiWenzhi Date: Mon, 20 Jan 2014 13:44:44 +0800 Subject: [PATCH 08/69] Add "override" --- cocos/gui/UILayoutParameter.h | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/gui/UILayoutParameter.h b/cocos/gui/UILayoutParameter.h index e3ad428243..3e439e4a1a 100644 --- a/cocos/gui/UILayoutParameter.h +++ b/cocos/gui/UILayoutParameter.h @@ -134,8 +134,8 @@ public: * @return LinearGravity */ LinearGravity getGravity() const; - virtual LayoutParameter* createCloneInstance(); - virtual void copyProperties(LayoutParameter* model); + virtual LayoutParameter* createCloneInstance() override; + virtual void copyProperties(LayoutParameter* model) override; protected: LinearGravity _linearGravity; }; @@ -209,8 +209,8 @@ public: */ const char* getRelativeName() const; - virtual LayoutParameter* createCloneInstance(); - virtual void copyProperties(LayoutParameter* model); + virtual LayoutParameter* createCloneInstance() override; + virtual void copyProperties(LayoutParameter* model) override; protected: RelativeAlign _relativeAlign; std::string _relativeWidgetName; From a1b7beb4006162a4d1ac6bd817e5984846e71580 Mon Sep 17 00:00:00 2001 From: Wilhansen Li Date: Tue, 25 Feb 2014 15:36:57 +0800 Subject: [PATCH 09/69] Fix spine::Skeleton not updating on re-entry. Could be done in a tighter manner by scheduling updates in spine::SkeletonAnimation instead and listening for animation events. However, this may need a more robust interface on scheduleUpdate and unscheduleUpdate to work correctly. --- cocos/editor-support/spine/CCSkeleton.cpp | 11 ++++++++++- cocos/editor-support/spine/CCSkeleton.h | 2 ++ 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/cocos/editor-support/spine/CCSkeleton.cpp b/cocos/editor-support/spine/CCSkeleton.cpp index 82c0ed50cd..0612f50106 100644 --- a/cocos/editor-support/spine/CCSkeleton.cpp +++ b/cocos/editor-support/spine/CCSkeleton.cpp @@ -70,7 +70,6 @@ void Skeleton::initialize () { setOpacityModifyRGB(true); setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); - scheduleUpdate(); } void Skeleton::setSkeletonData (spSkeletonData *skeletonData, bool isOwnsSkeletonData) { @@ -275,6 +274,16 @@ Rect Skeleton::getBoundingBox () const { return Rect(position.x + minX, position.y + minY, maxX - minX, maxY - minY); } +void Skeleton::onEnter() { + Node::onEnter(); + scheduleUpdate(); +} + +void Skeleton::onExit() { + Node::onExit(); + unscheduleUpdate(); +} + // --- Convenience methods for Skeleton_* functions. void Skeleton::updateWorldTransform () { diff --git a/cocos/editor-support/spine/CCSkeleton.h b/cocos/editor-support/spine/CCSkeleton.h index a2460ca690..cfd524b46d 100644 --- a/cocos/editor-support/spine/CCSkeleton.h +++ b/cocos/editor-support/spine/CCSkeleton.h @@ -69,6 +69,8 @@ public: virtual void update (float deltaTime) override; virtual void draw() override; void onDraw(); + void onEnter() override; + void onExit() override; virtual cocos2d::Rect getBoundingBox () const override; // --- Convenience methods for common Skeleton_* functions. From d4b9544365e515963c1a5010057f38e7112f66d7 Mon Sep 17 00:00:00 2001 From: andyque Date: Thu, 27 Feb 2014 11:23:26 +0800 Subject: [PATCH 10/69] fixed #3868. when the singleton destoryed, the cocos thread may later than that which will cause the s_responseQueue to be nil. --- cocos/network/HttpClient.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/cocos/network/HttpClient.cpp b/cocos/network/HttpClient.cpp index 0cc792faeb..c7bdea7edd 100644 --- a/cocos/network/HttpClient.cpp +++ b/cocos/network/HttpClient.cpp @@ -481,7 +481,10 @@ void HttpClient::send(HttpRequest* request) void HttpClient::dispatchResponseCallbacks() { // log("CCHttpClient::dispatchResponseCallbacks is running"); - + //occurs when cocos thread fires but the network thread has already quited + if (nullptr == s_responseQueue) { + return; + } HttpResponse* response = nullptr; s_responseQueueMutex.lock(); From c8b6438750ba8f2a3c74d49f25b18d9032c692ef Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 10:18:08 +0800 Subject: [PATCH 11/69] Update AUTHORS [ci skip] --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 9f9fafb000..4859b3a398 100644 --- a/AUTHORS +++ b/AUTHORS @@ -770,6 +770,9 @@ Developers: seemk Fixed crash if invoking Director::end() on WINDOWS. + + odedsh + Fixed a bug that loading custom fonts from ttf file fails on windows. Retired Core Developers: WenSheng Yang From 7bfd180743d3ac6ad29c4e7f2fe98cb62d758b13 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 10:19:37 +0800 Subject: [PATCH 12/69] Update CHANGELOG [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index aebfe51d61..84b406aa5d 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ cocos2d-x-3.0rc0 Feb.?? 2014 [NEW] Language: Added Dutch support. [NEW] Sprite: Added auto-culling support + [FIX] Loading custom fonts from ttf file fails on windows. [FIX] FadeIn and FadeOut behaviours is incorrect if it doesn't start from an edge value( 0 or 255). [FIX] Renderer: Expand textureID bit from 18bits to 32bits. Resolves probably crash on Linux / Android. [FIX] Potential crash by switching repeatly between HttpClientTest, WebSocketTest, SocketIOTest. From 8ebf00fec12df8dbdb063305efa3487aa6a5430e Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Thu, 27 Feb 2014 19:40:21 -0800 Subject: [PATCH 13/69] SpineDrawing fixes --- cocos/editor-support/spine/CCSkeleton.cpp | 92 +++++++++++------------ cocos/editor-support/spine/CCSkeleton.h | 4 +- 2 files changed, 46 insertions(+), 50 deletions(-) diff --git a/cocos/editor-support/spine/CCSkeleton.cpp b/cocos/editor-support/spine/CCSkeleton.cpp index 82c0ed50cd..9254b5dddf 100644 --- a/cocos/editor-support/spine/CCSkeleton.cpp +++ b/cocos/editor-support/spine/CCSkeleton.cpp @@ -128,9 +128,7 @@ void Skeleton::update (float deltaTime) { void Skeleton::draw() { - kmGLMatrixMode(KM_GL_MODELVIEW); - kmGLGetMatrix(KM_GL_MODELVIEW, &_oldTransMatrix); - + _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Skeleton::onDraw, this); Director::getInstance()->getRenderer()->addCommand(&_customCommand); @@ -138,10 +136,6 @@ void Skeleton::draw() void Skeleton::onDraw () { - kmGLMatrixMode(KM_GL_MODELVIEW); - kmGLPushMatrix(); - kmGLLoadMatrix(&_oldTransMatrix); - CC_NODE_DRAW_SETUP(); GL::blendFunc(blendFunc.src, blendFunc.dst); @@ -198,46 +192,50 @@ void Skeleton::onDraw () textureAtlas->removeAllQuads(); } - if (debugSlots) { - // Slots. - DrawPrimitives::setDrawColor4B(0, 0, 255, 255); - glLineWidth(1); - Point points[4]; - V3F_C4B_T2F_Quad tmpQuad; - for (int i = 0, n = skeleton->slotCount; i < n; i++) { - spSlot* slot = skeleton->drawOrder[i]; - if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; - spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; - spRegionAttachment_updateQuad(attachment, slot, &tmpQuad); - points[0] = Point(tmpQuad.bl.vertices.x, tmpQuad.bl.vertices.y); - points[1] = Point(tmpQuad.br.vertices.x, tmpQuad.br.vertices.y); - points[2] = Point(tmpQuad.tr.vertices.x, tmpQuad.tr.vertices.y); - points[3] = Point(tmpQuad.tl.vertices.x, tmpQuad.tl.vertices.y); - DrawPrimitives::drawPoly(points, 4, true); - } - } - if (debugBones) { - // Bone lengths. - glLineWidth(2); - DrawPrimitives::setDrawColor4B(255, 0, 0, 255); - for (int i = 0, n = skeleton->boneCount; i < n; i++) { - spBone *bone = skeleton->bones[i]; - float x = bone->data->length * bone->m00 + bone->worldX; - float y = bone->data->length * bone->m10 + bone->worldY; - DrawPrimitives::drawLine(Point(bone->worldX, bone->worldY), Point(x, y)); - } - // Bone origins. - DrawPrimitives::setPointSize(4); - DrawPrimitives::setDrawColor4B(0, 0, 255, 255); // Root bone is blue. - for (int i = 0, n = skeleton->boneCount; i < n; i++) { - spBone *bone = skeleton->bones[i]; - DrawPrimitives::drawPoint(Point(bone->worldX, bone->worldY)); - if (i == 0) DrawPrimitives::setDrawColor4B(0, 255, 0, 255); - } - } - - kmGLMatrixMode(KM_GL_MODELVIEW); - kmGLPopMatrix(); + if(debugBones || debugSlots) { + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); + + if (debugSlots) { + // Slots. + DrawPrimitives::setDrawColor4B(0, 0, 255, 255); + glLineWidth(1); + Point points[4]; + V3F_C4B_T2F_Quad tmpQuad; + for (int i = 0, n = skeleton->slotCount; i < n; i++) { + spSlot* slot = skeleton->drawOrder[i]; + if (!slot->attachment || slot->attachment->type != ATTACHMENT_REGION) continue; + spRegionAttachment* attachment = (spRegionAttachment*)slot->attachment; + spRegionAttachment_updateQuad(attachment, slot, &tmpQuad); + points[0] = Point(tmpQuad.bl.vertices.x, tmpQuad.bl.vertices.y); + points[1] = Point(tmpQuad.br.vertices.x, tmpQuad.br.vertices.y); + points[2] = Point(tmpQuad.tr.vertices.x, tmpQuad.tr.vertices.y); + points[3] = Point(tmpQuad.tl.vertices.x, tmpQuad.tl.vertices.y); + DrawPrimitives::drawPoly(points, 4, true); + } + } + if (debugBones) { + // Bone lengths. + glLineWidth(2); + DrawPrimitives::setDrawColor4B(255, 0, 0, 255); + for (int i = 0, n = skeleton->boneCount; i < n; i++) { + spBone *bone = skeleton->bones[i]; + float x = bone->data->length * bone->m00 + bone->worldX; + float y = bone->data->length * bone->m10 + bone->worldY; + DrawPrimitives::drawLine(Point(bone->worldX, bone->worldY), Point(x, y)); + } + // Bone origins. + DrawPrimitives::setPointSize(4); + DrawPrimitives::setDrawColor4B(0, 0, 255, 255); // Root bone is blue. + for (int i = 0, n = skeleton->boneCount; i < n; i++) { + spBone *bone = skeleton->bones[i]; + DrawPrimitives::drawPoint(Point(bone->worldX, bone->worldY)); + if (i == 0) DrawPrimitives::setDrawColor4B(0, 255, 0, 255); + } + } + + kmGLPopMatrix(); + } } TextureAtlas* Skeleton::getTextureAtlas (spRegionAttachment* regionAttachment) const { diff --git a/cocos/editor-support/spine/CCSkeleton.h b/cocos/editor-support/spine/CCSkeleton.h index a2460ca690..23c70101b3 100644 --- a/cocos/editor-support/spine/CCSkeleton.h +++ b/cocos/editor-support/spine/CCSkeleton.h @@ -109,9 +109,7 @@ private: // Util function that setting blend-function by nextRenderedTexture's premultiplied flag void setFittedBlendingFunc(cocos2d::TextureAtlas * nextRenderedTexture); - cocos2d::CustomCommand _customCommand; - - kmMat4 _oldTransMatrix; + cocos2d::CustomCommand _customCommand; }; } From ddf5957a9ce36b8c1fff6111157f4c8f81820f5d Mon Sep 17 00:00:00 2001 From: zhangbin Date: Fri, 28 Feb 2014 11:43:41 +0800 Subject: [PATCH 14/69] closed #3684, Set shader program before TextureAtlas is rendered. --- cocos/2d/CCTextureAtlas.h | 3 +++ tests/Classes/LabelTest/LabelTest.cpp | 3 ++- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/cocos/2d/CCTextureAtlas.h b/cocos/2d/CCTextureAtlas.h index a73f37bbae..fb08de5096 100644 --- a/cocos/2d/CCTextureAtlas.h +++ b/cocos/2d/CCTextureAtlas.h @@ -55,6 +55,9 @@ Supported features: * OpenGL component: V3F, C4B, T2F. The quads are rendered using an OpenGL ES VBO. To render the quads using an interleaved vertex array list, you should modify the ccConfig.h file + +@warning If you want to use TextureAtlas, you'd better setup GL status before it's rendered. + Otherwise, the effect of TextureAtlas will be affected by the GL status of other nodes. */ class CC_DLL TextureAtlas : public Ref { diff --git a/tests/Classes/LabelTest/LabelTest.cpp b/tests/Classes/LabelTest/LabelTest.cpp index 2f82279909..099e14e422 100644 --- a/tests/Classes/LabelTest/LabelTest.cpp +++ b/tests/Classes/LabelTest/LabelTest.cpp @@ -209,7 +209,7 @@ void Atlas1::draw() { // GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY // GL_TEXTURE_2D - + setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE)); _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Atlas1::onDraw, this); Director::getInstance()->getRenderer()->addCommand(&_customCommand); @@ -220,6 +220,7 @@ void Atlas1::draw() void Atlas1::onDraw() { + CC_NODE_DRAW_SETUP(); _textureAtlas->drawQuads(); } From 9a5adc5be592e3f155899ae8a17b295a6093c086 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Fri, 28 Feb 2014 11:52:08 +0800 Subject: [PATCH 15/69] closed #3684, Optimize the code of TextureAtlas test case. --- tests/Classes/LabelTest/LabelTest.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/Classes/LabelTest/LabelTest.cpp b/tests/Classes/LabelTest/LabelTest.cpp index 099e14e422..b1d3a08745 100644 --- a/tests/Classes/LabelTest/LabelTest.cpp +++ b/tests/Classes/LabelTest/LabelTest.cpp @@ -162,6 +162,7 @@ void AtlasDemo::backCallback(Ref* sender) //------------------------------------------------------------------ Atlas1::Atlas1() { + setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE)); _textureAtlas = TextureAtlas::create(s_AtlasTest, 3); _textureAtlas->retain(); auto s = Director::getInstance()->getWinSize(); @@ -209,7 +210,6 @@ void Atlas1::draw() { // GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY // GL_TEXTURE_2D - setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE)); _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Atlas1::onDraw, this); Director::getInstance()->getRenderer()->addCommand(&_customCommand); From 8a04fbabf1bb2fafdd0a1c64586ad0a677cdfa46 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 12:01:47 +0800 Subject: [PATCH 16/69] issue #4129: EventDispatcher::_listeners -> _listenerMap. --- cocos/2d/CCEventDispatcher.cpp | 38 +++++++++++++++++----------------- cocos/2d/CCEventDispatcher.h | 2 +- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index 2d9d18d169..efcfd60443 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -355,12 +355,12 @@ void EventDispatcher::forceAddEventListener(EventListener* listener) { EventListenerVector* listeners = nullptr; EventListener::ListenerID listenerID = listener->getListenerID(); - auto itr = _listeners.find(listenerID); - if (itr == _listeners.end()) + auto itr = _listenerMap.find(listenerID); + if (itr == _listenerMap.end()) { listeners = new EventListenerVector(); - _listeners.insert(std::make_pair(listenerID, listeners)); + _listenerMap.insert(std::make_pair(listenerID, listeners)); } else { @@ -463,7 +463,7 @@ void EventDispatcher::removeEventListener(EventListener* listener) } }; - for (auto iter = _listeners.begin(); iter != _listeners.end();) + for (auto iter = _listenerMap.begin(); iter != _listenerMap.end();) { auto listeners = iter->second; auto fixedPriorityListeners = listeners->getFixedPriorityListeners(); @@ -479,7 +479,7 @@ void EventDispatcher::removeEventListener(EventListener* listener) { _priorityDirtyFlagMap.erase(listener->getListenerID()); auto list = iter->second; - iter = _listeners.erase(iter); + iter = _listenerMap.erase(iter); CC_SAFE_DELETE(list); } else @@ -514,7 +514,7 @@ void EventDispatcher::setPriority(EventListener* listener, int fixedPriority) if (listener == nullptr) return; - for (auto iter = _listeners.begin(); iter != _listeners.end(); ++iter) + for (auto iter = _listenerMap.begin(); iter != _listenerMap.end(); ++iter) { auto fixedPriorityListeners = iter->second->getFixedPriorityListeners(); if (fixedPriorityListeners) @@ -613,8 +613,8 @@ void EventDispatcher::dispatchEvent(Event* event) sortEventListeners(listenerID); - auto iter = _listeners.find(listenerID); - if (iter != _listeners.end()) + auto iter = _listenerMap.find(listenerID); + if (iter != _listenerMap.end()) { auto listeners = iter->second; @@ -835,8 +835,8 @@ void EventDispatcher::updateListeners(Event* event) { auto onUpdateListeners = [this](const EventListener::ListenerID& listenerID) { - auto listenersIter = _listeners.find(listenerID); - if (listenersIter == _listeners.end()) + auto listenersIter = _listenerMap.find(listenerID); + if (listenersIter == _listenerMap.end()) return; auto listeners = listenersIter->second; @@ -891,7 +891,7 @@ void EventDispatcher::updateListeners(Event* event) { _priorityDirtyFlagMap.erase(listenersIter->first); delete listenersIter->second; - _listeners.erase(listenersIter); + _listenerMap.erase(listenersIter); } }; @@ -1027,8 +1027,8 @@ void EventDispatcher::sortEventListenersOfFixedPriority(const EventListener::Lis EventDispatcher::EventListenerVector* EventDispatcher::getListeners(const EventListener::ListenerID& listenerID) { - auto iter = _listeners.find(listenerID); - if (iter != _listeners.end()) + auto iter = _listenerMap.find(listenerID); + if (iter != _listenerMap.end()) { return iter->second; } @@ -1038,8 +1038,8 @@ EventDispatcher::EventListenerVector* EventDispatcher::getListeners(const EventL void EventDispatcher::removeEventListenersForListenerID(const EventListener::ListenerID& listenerID) { - auto listenerItemIter = _listeners.find(listenerID); - if (listenerItemIter != _listeners.end()) + auto listenerItemIter = _listenerMap.find(listenerID); + if (listenerItemIter != _listenerMap.end()) { auto listeners = listenerItemIter->second; auto fixedPriorityListeners = listeners->getFixedPriorityListeners(); @@ -1077,7 +1077,7 @@ void EventDispatcher::removeEventListenersForListenerID(const EventListener::Lis { listeners->clear(); delete listeners; - _listeners.erase(listenerItemIter); + _listenerMap.erase(listenerItemIter); _priorityDirtyFlagMap.erase(listenerID); } } @@ -1131,9 +1131,9 @@ void EventDispatcher::removeCustomEventListeners(const std::string& customEventN void EventDispatcher::removeAllEventListeners() { - std::vector types(_listeners.size()); + std::vector types(_listenerMap.size()); - for (const auto& e : _listeners) + for (const auto& e : _listenerMap) { types.push_back(e.first); } @@ -1145,7 +1145,7 @@ void EventDispatcher::removeAllEventListeners() if (!_inDispatch) { - _listeners.clear(); + _listenerMap.clear(); } } diff --git a/cocos/2d/CCEventDispatcher.h b/cocos/2d/CCEventDispatcher.h index c05dbaba48..381508bbc2 100644 --- a/cocos/2d/CCEventDispatcher.h +++ b/cocos/2d/CCEventDispatcher.h @@ -220,7 +220,7 @@ protected: void visitTarget(Node* node, bool isRootNode); /** Listeners map */ - std::unordered_map _listeners; + std::unordered_map _listenerMap; /** The map of dirty flag */ std::unordered_map _priorityDirtyFlagMap; From 658cf72d316e80d54f7fd90f17cd86b23d26a1c4 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 13:43:28 +0800 Subject: [PATCH 17/69] issue #4129: Uses 'const reference' when getting touches by EventTouch::getTouches. --- cocos/2d/CCEventDispatcher.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index efcfd60443..54b3617027 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -652,7 +652,7 @@ void EventDispatcher::dispatchTouchEvent(EventTouch* event) bool isNeedsMutableSet = (oneByOneListeners && allAtOnceListeners); - std::vector originalTouches = event->getTouches(); + const std::vector& originalTouches = event->getTouches(); std::vector mutableTouches(originalTouches.size()); std::copy(originalTouches.begin(), originalTouches.end(), mutableTouches.begin()); From eb66ddd931b6ec622f9fcb8f2b083dbf8a4028d2 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Thu, 27 Feb 2014 21:43:54 -0800 Subject: [PATCH 18/69] visit and draw improved. `visit()` and `draw()` are improved. they both receive: - `Renderer` - `kmMat4` for transformation - `bool` whether or not the transform changed from the previous frame Although `draw` and `visit` are not using the 3 new parameters, they will start using it in the coming days (or weeks, or months). Those parameters are needed for: - `Renderer` shouldn't be a singleton. There should be one renderer per Director. There could be more than one renderer - we should get rid of `kmGLXXX` functions since nodoby knows what is happening. the `kmMat4` is for that. - whenever possible, we should try to optimize the multiplications. the `dirty` flag is for that. We need those changes, so, it is better to change the API now, and not right after v3.0-final is released. --- cocos/2d/CCAtlasNode.cpp | 12 +-- cocos/2d/CCAtlasNode.h | 2 +- cocos/2d/CCClippingNode.cpp | 21 ++--- cocos/2d/CCClippingNode.h | 2 +- cocos/2d/CCDirector.cpp | 18 ++-- cocos/2d/CCDrawNode.cpp | 2 +- cocos/2d/CCDrawNode.h | 2 +- cocos/2d/CCLabel.cpp | 10 ++- cocos/2d/CCLabel.h | 4 +- cocos/2d/CCLayer.cpp | 2 +- cocos/2d/CCLayer.h | 2 +- cocos/2d/CCMotionStreak.cpp | 2 +- cocos/2d/CCMotionStreak.h | 2 +- cocos/2d/CCNode.cpp | 38 +++++--- cocos/2d/CCNode.h | 8 +- cocos/2d/CCNodeGrid.cpp | 18 ++-- cocos/2d/CCNodeGrid.h | 2 +- cocos/2d/CCParallaxNode.cpp | 4 +- cocos/2d/CCParallaxNode.h | 2 +- cocos/2d/CCParticleBatchNode.cpp | 10 ++- cocos/2d/CCParticleBatchNode.h | 4 +- cocos/2d/CCParticleSystemQuad.cpp | 88 +------------------ cocos/2d/CCParticleSystemQuad.h | 2 +- cocos/2d/CCProgressTimer.cpp | 2 +- cocos/2d/CCProgressTimer.h | 2 +- cocos/2d/CCRenderTexture.cpp | 19 ++-- cocos/2d/CCRenderTexture.h | 4 +- cocos/2d/CCSprite.cpp | 2 +- cocos/2d/CCSprite.h | 2 +- cocos/2d/CCSpriteBatchNode.cpp | 11 ++- cocos/2d/CCSpriteBatchNode.h | 4 +- cocos/2d/CCTextFieldTTF.cpp | 6 +- cocos/2d/CCTextFieldTTF.h | 2 +- cocos/2d/CCTransition.cpp | 44 +++++----- cocos/2d/CCTransition.h | 10 +-- cocos/2d/CCTransitionPageTurn.cpp | 12 +-- cocos/2d/CCTransitionPageTurn.h | 2 +- .../editor-support/cocostudio/CCArmature.cpp | 18 ++-- cocos/editor-support/cocostudio/CCArmature.h | 4 +- .../editor-support/cocostudio/CCBatchNode.cpp | 15 ++-- cocos/editor-support/cocostudio/CCBatchNode.h | 11 +-- cocos/editor-support/cocostudio/CCSkin.cpp | 2 +- cocos/editor-support/cocostudio/CCSkin.h | 2 +- cocos/editor-support/spine/CCSkeleton.cpp | 2 +- cocos/editor-support/spine/CCSkeleton.h | 2 +- cocos/gui/UILayout.cpp | 34 ++++--- cocos/gui/UILayout.h | 6 +- cocos/gui/UIWidget.cpp | 4 +- cocos/gui/UIWidget.h | 2 +- .../GUI/CCControlExtension/CCScale9Sprite.cpp | 4 +- .../GUI/CCControlExtension/CCScale9Sprite.h | 2 +- extensions/GUI/CCEditBox/CCEditBox.cpp | 4 +- extensions/GUI/CCEditBox/CCEditBox.h | 2 +- extensions/GUI/CCScrollView/CCScrollView.cpp | 15 ++-- extensions/GUI/CCScrollView/CCScrollView.h | 2 +- .../physics-nodes/CCPhysicsDebugNode.cpp | 4 +- extensions/physics-nodes/CCPhysicsDebugNode.h | 2 +- tests/Classes/ActionsTest/ActionsTest.cpp | 20 ++--- tests/Classes/ActionsTest/ActionsTest.h | 10 +-- tests/Classes/Box2DTest/Box2dTest.cpp | 4 +- tests/Classes/Box2DTest/Box2dTest.h | 2 +- tests/Classes/Box2DTestBed/Box2dView.cpp | 4 +- tests/Classes/Box2DTestBed/Box2dView.h | 2 +- .../ClippingNodeTest/ClippingNodeTest.cpp | 7 +- .../ClippingNodeTest/ClippingNodeTest.h | 2 +- .../DrawPrimitivesTest/DrawPrimitivesTest.cpp | 2 +- .../DrawPrimitivesTest/DrawPrimitivesTest.h | 2 +- .../CocoStudioArmatureTest/ArmatureScene.cpp | 6 +- .../CocoStudioArmatureTest/ArmatureScene.h | 6 +- .../CocoStudioSceneTest/SceneEditorTest.cpp | 4 +- .../CocoStudioSceneTest/SceneEditorTest.h | 2 +- .../TableViewTest/CustomTableViewCell.cpp | 4 +- .../TableViewTest/CustomTableViewCell.h | 2 +- tests/Classes/LabelTest/LabelTest.cpp | 6 +- tests/Classes/LabelTest/LabelTest.h | 6 +- tests/Classes/LabelTest/LabelTestNew.cpp | 6 +- tests/Classes/LabelTest/LabelTestNew.h | 6 +- tests/Classes/MutiTouchTest/MutiTouchTest.cpp | 2 +- tests/Classes/NodeTest/NodeTest.cpp | 4 +- .../RenderTextureTest/RenderTextureTest.cpp | 6 +- .../RenderTextureTest/RenderTextureTest.h | 4 +- tests/Classes/ShaderTest/ShaderTest.cpp | 6 +- tests/Classes/ShaderTest/ShaderTest.h | 2 +- tests/Classes/ShaderTest/ShaderTest2.cpp | 4 +- tests/Classes/Texture2dTest/Texture2dTest.cpp | 8 +- tests/Classes/Texture2dTest/Texture2dTest.h | 4 +- tests/Classes/TileMapTest/TileMapTest.cpp | 6 +- tests/Classes/TileMapTest/TileMapTest.h | 6 +- 88 files changed, 304 insertions(+), 367 deletions(-) diff --git a/cocos/2d/CCAtlasNode.cpp b/cocos/2d/CCAtlasNode.cpp index 15492a651f..33bb3392d6 100644 --- a/cocos/2d/CCAtlasNode.cpp +++ b/cocos/2d/CCAtlasNode.cpp @@ -138,18 +138,8 @@ void AtlasNode::updateAtlasValues() } // AtlasNode - draw -void AtlasNode::draw(void) +void AtlasNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { -// CC_NODE_DRAW_SETUP(); -// -// GL::blendFunc( _blendFunc.src, _blendFunc.dst ); -// -// GLfloat colors[4] = {_displayedColor.r / 255.0f, _displayedColor.g / 255.0f, _displayedColor.b / 255.0f, _displayedOpacity / 255.0f}; -// getShaderProgram()->setUniformLocationWith4fv(_uniformColor, colors, 1); -// -// _textureAtlas->drawNumberOfQuads(_quadsToDraw, 0); - - auto shader = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP); _quadCommand.init( diff --git a/cocos/2d/CCAtlasNode.h b/cocos/2d/CCAtlasNode.h index 065ae77353..2af1d89134 100644 --- a/cocos/2d/CCAtlasNode.h +++ b/cocos/2d/CCAtlasNode.h @@ -69,7 +69,7 @@ public: // Overrides - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual Texture2D* getTexture() const override; virtual void setTexture(Texture2D *texture) override; virtual bool isOpacityModifyRGB() const override; diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 47cd72a881..4fe5438493 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -199,17 +199,18 @@ void ClippingNode::drawFullScreenQuadClearStencil() kmGLPopMatrix(); } -void ClippingNode::visit() +void ClippingNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { if(!_visible) return; kmGLPushMatrix(); - transform(); + + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); //Add group command - - Renderer* renderer = Director::getInstance()->getRenderer(); - + _groupCommand.init(_globalZOrder); renderer->addCommand(&_groupCommand); @@ -236,7 +237,7 @@ void ClippingNode::visit() #endif } - _stencil->visit(); + _stencil->visit(renderer, _modelViewTransform, dirty); _afterDrawStencilCmd.init(_globalZOrder); _afterDrawStencilCmd.func = CC_CALLBACK_0(ClippingNode::onAfterDrawStencil, this); @@ -253,19 +254,19 @@ void ClippingNode::visit() auto node = _children.at(i); if ( node && node->getLocalZOrder() < 0 ) - node->visit(); + node->visit(renderer, _modelViewTransform, dirty); else break; } // self draw - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) - (*it)->visit(); + (*it)->visit(renderer, _modelViewTransform, dirty); } else { - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); } _afterVisitCmd.init(_globalZOrder); diff --git a/cocos/2d/CCClippingNode.h b/cocos/2d/CCClippingNode.h index 5f9e0caa12..6f0606adc4 100644 --- a/cocos/2d/CCClippingNode.h +++ b/cocos/2d/CCClippingNode.h @@ -95,7 +95,7 @@ public: * @lua NA */ virtual void onExit() override; - virtual void visit() override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; protected: ClippingNode(); diff --git a/cocos/2d/CCDirector.cpp b/cocos/2d/CCDirector.cpp index d5af6ac15b..3361ecacf3 100644 --- a/cocos/2d/CCDirector.cpp +++ b/cocos/2d/CCDirector.cpp @@ -275,17 +275,21 @@ void Director::drawScene() kmGLPushMatrix(); + // global identity matrix is needed... come on kazmath! + kmMat4 identity; + kmMat4Identity(&identity); + // draw the scene if (_runningScene) { - _runningScene->visit(); + _runningScene->visit(_renderer, identity, true); _eventDispatcher->dispatchEvent(_eventAfterVisit); } // draw the notifications node if (_notificationNode) { - _notificationNode->visit(); + _notificationNode->visit(_renderer, identity, false); } if (_displayStats) @@ -870,9 +874,13 @@ void Director::showStats() prevVerts = currentVerts; } - _drawnVerticesLabel->visit(); - _drawnBatchesLabel->visit(); - _FPSLabel->visit(); + // global identity matrix is needed... come on kazmath! + kmMat4 identity; + kmMat4Identity(&identity); + + _drawnVerticesLabel->visit(_renderer, identity, false); + _drawnBatchesLabel->visit(_renderer, identity, false); + _FPSLabel->visit(_renderer, identity, false); } } diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index 6f6af9dcea..e695f2ae1e 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -239,7 +239,7 @@ void DrawNode::render() CHECK_GL_ERROR_DEBUG(); } -void DrawNode::draw() +void DrawNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(DrawNode::onDraw, this); diff --git a/cocos/2d/CCDrawNode.h b/cocos/2d/CCDrawNode.h index 2624eeee0b..1c7fd6eb82 100644 --- a/cocos/2d/CCDrawNode.h +++ b/cocos/2d/CCDrawNode.h @@ -92,7 +92,7 @@ public: void onDraw(); // Overrides - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: DrawNode(); diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 36956d918e..877d9f88a8 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -679,14 +679,14 @@ void Label::onDraw() CC_PROFILER_STOP("Label - draw"); } -void Label::draw() +void Label::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Label::onDraw, this); Director::getInstance()->getRenderer()->addCommand(&_customCommand); } -void Label::visit() +void Label::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { if (! _visible) { @@ -695,8 +695,10 @@ void Label::visit() kmGLPushMatrix(); - transform(); - draw(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); + draw(renderer, _modelViewTransform, dirty); kmGLPopMatrix(); diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index e6f9f39b7b..4be65b0137 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -128,8 +128,8 @@ public: void addChild(Node * child, int zOrder=0, int tag=0) override; virtual std::string getDescription() const override; - virtual void visit() override; - virtual void draw(void) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void onDraw(); virtual FontAtlas* getFontAtlas() const {return _fontAtlas;} diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index d71fb67d84..97c00d86d0 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -581,7 +581,7 @@ void LayerColor::updateColor() } } -void LayerColor::draw() +void LayerColor::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(LayerColor::onDraw, this); diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index ea028e1e1e..73f3192f55 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -266,7 +266,7 @@ public: // // Overrides // - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void onDraw(); virtual void setContentSize(const Size & var) override; diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index 735a8edae2..5bd4a49aa2 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -354,7 +354,7 @@ void MotionStreak::onDraw() glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)_nuPoints*2); } -void MotionStreak::draw() +void MotionStreak::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if(_nuPoints <= 1) return; diff --git a/cocos/2d/CCMotionStreak.h b/cocos/2d/CCMotionStreak.h index 09daacf5f6..96d050a7d4 100644 --- a/cocos/2d/CCMotionStreak.h +++ b/cocos/2d/CCMotionStreak.h @@ -78,7 +78,7 @@ public: * @js NA * @lua NA */ - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; /** * @js NA * @lua NA diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 49472cf822..fc59f584c2 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -900,15 +900,25 @@ void Node::sortAllChildren() } - void Node::draw() - { - //CCASSERT(0); - // override me - // Only use- this function to draw your stuff. - // DON'T draw your stuff outside this method - } +void Node::draw() +{ + auto renderer = Director::getInstance()->getRenderer(); + draw(renderer, _modelViewTransform, true); +} + +void Node::draw(Renderer* renderer, const kmMat4 &transform, bool transformDirty) +{ +} void Node::visit() +{ + auto renderer = Director::getInstance()->getRenderer(); + kmMat4 parentTransform; + kmGLGetMatrix(KM_GL_MODELVIEW, &parentTransform); + visit(renderer, parentTransform, true); +} + +void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -918,7 +928,11 @@ void Node::visit() kmGLPushMatrix(); - this->transform(); + bool dirty = _transformDirty || parentTransformDirty; + + if(dirty) + this->transform(); + int i = 0; if(!_children.empty()) @@ -930,19 +944,19 @@ void Node::visit() auto node = _children.at(i); if ( node && node->_localZOrder < 0 ) - node->visit(); + node->visit(renderer, _modelViewTransform, dirty); else break; } // self draw - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) - (*it)->visit(); + (*it)->visit(renderer, _modelViewTransform, dirty); } else { - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); } // reset for next frame diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 1d00884cda..c9911df79d 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -54,6 +54,7 @@ class Component; class ComponentContainer; class EventDispatcher; class Scene; +class Renderer; #if CC_USE_PHYSICS class PhysicsBody; #endif @@ -990,12 +991,15 @@ public: * AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE * But if you enable any other GL state, you should disable it after drawing your node. */ - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4& transform, bool transformDirty); + virtual void draw() final; /** * Visits this node's children and draw them recursively. */ - virtual void visit(); + virtual void visit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty); + virtual void visit() final; + /** Returns the Scene that contains the Node. It returns `nullptr` if the node doesn't belong to any Scene. diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index be7c1d1a8c..6fe62fb361 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -82,7 +82,7 @@ void NodeGrid::onGridEndDraw() } } -void NodeGrid::visit() +void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -90,8 +90,6 @@ void NodeGrid::visit() return; } - Renderer* renderer = Director::getInstance()->getRenderer(); - _groupCommand.init(_globalZOrder); renderer->addCommand(&_groupCommand); renderer->pushGroup(_groupCommand.getRenderQueueID()); @@ -108,11 +106,13 @@ void NodeGrid::visit() _gridBeginCommand.func = CC_CALLBACK_0(NodeGrid::onGridBeginDraw, this); renderer->addCommand(&_gridBeginCommand); - this->transform(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + this->transform(); if(_gridTarget) { - _gridTarget->visit(); + _gridTarget->visit(renderer, _modelViewTransform, dirty); } int i = 0; @@ -126,20 +126,20 @@ void NodeGrid::visit() auto node = _children.at(i); if ( node && node->getLocalZOrder() < 0 ) - node->visit(); + node->visit(renderer, _modelViewTransform, dirty); else break; } // self draw,currently we have nothing to draw on NodeGrid, so there is no need to add render command - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) { - (*it)->visit(); + (*it)->visit(renderer, _modelViewTransform, dirty); } } else { - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); } // reset for next frame diff --git a/cocos/2d/CCNodeGrid.h b/cocos/2d/CCNodeGrid.h index b46a3fab72..45c165b1e0 100644 --- a/cocos/2d/CCNodeGrid.h +++ b/cocos/2d/CCNodeGrid.h @@ -55,7 +55,7 @@ public: void setTarget(Node *target); // overrides - virtual void visit() override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; protected: NodeGrid(); diff --git a/cocos/2d/CCParallaxNode.cpp b/cocos/2d/CCParallaxNode.cpp index 85b85ba6c5..85968330d6 100644 --- a/cocos/2d/CCParallaxNode.cpp +++ b/cocos/2d/CCParallaxNode.cpp @@ -145,7 +145,7 @@ The positions are updated at visit because: - using a timer is not guaranteed that it will called after all the positions were updated - overriding "draw" will only precise if the children have a z > 0 */ -void ParallaxNode::visit() +void ParallaxNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // Point pos = position_; // Point pos = [self convertToWorldSpace:Point::ZERO]; @@ -161,7 +161,7 @@ void ParallaxNode::visit() } _lastPosition = pos; } - Node::visit(); + Node::visit(renderer, parentTransform, parentTransformDirty); } NS_CC_END diff --git a/cocos/2d/CCParallaxNode.h b/cocos/2d/CCParallaxNode.h index 827c5074e3..26956c5a67 100644 --- a/cocos/2d/CCParallaxNode.h +++ b/cocos/2d/CCParallaxNode.h @@ -67,7 +67,7 @@ public: virtual void addChild(Node * child, int zOrder, int tag) override; virtual void removeChild(Node* child, bool cleanup) override; virtual void removeAllChildrenWithCleanup(bool cleanup) override; - virtual void visit(void) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; protected: /** Adds a child to the container with a z-order, a parallax ratio and a position offset diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index 40a7bc471b..5cc31db804 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -120,7 +120,7 @@ bool ParticleBatchNode::initWithFile(const std::string& fileImage, int capacity) // override visit. // Don't call visit on it's children -void ParticleBatchNode::visit() +void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // CAREFUL: // This visit is almost identical to Node#visit @@ -136,9 +136,11 @@ void ParticleBatchNode::visit() kmGLPushMatrix(); - transform(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); - draw(); + draw(renderer, _modelViewTransform, dirty); kmGLPopMatrix(); } @@ -373,7 +375,7 @@ void ParticleBatchNode::removeAllChildrenWithCleanup(bool doCleanup) _textureAtlas->removeAllQuads(); } -void ParticleBatchNode::draw(void) +void ParticleBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { CC_PROFILER_START("CCParticleBatchNode - draw"); diff --git a/cocos/2d/CCParticleBatchNode.h b/cocos/2d/CCParticleBatchNode.h index bb092e96d2..9623c74dee 100644 --- a/cocos/2d/CCParticleBatchNode.h +++ b/cocos/2d/CCParticleBatchNode.h @@ -97,13 +97,13 @@ public: inline void setTextureAtlas(TextureAtlas* atlas) { _textureAtlas = atlas; }; // Overrides - void visit(); + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; virtual void removeChild(Node* child, bool cleanup) override; virtual void reorderChild(Node * child, int zOrder) override; - virtual void draw(void) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual Texture2D* getTexture(void) const override; virtual void setTexture(Texture2D *texture) override; /** diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index ab14d1e8e4..afa62e20e9 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -358,103 +358,17 @@ void ParticleSystemQuad::postStep() } // overriding draw method -//void ParticleSystemQuad::draw() -//{ -// CCASSERT(!_batchNode,"draw should not be called when added to a particleBatchNode"); -// -// CC_NODE_DRAW_SETUP(); -// -// GL::bindTexture2D( _texture->getName() ); -// GL::blendFunc( _blendFunc.src, _blendFunc.dst ); -// -// CCASSERT( _particleIdx == _particleCount, "Abnormal error in particle quad"); -// -// if (Configuration::getInstance()->supportsShareableVAO()) -// { -// // -// // Using VBO and VAO -// // -// GL::bindVAO(_VAOname); -// -//#if CC_REBIND_INDICES_BUFFER -// glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); -//#endif -// -// glDrawElements(GL_TRIANGLES, (GLsizei) _particleIdx*6, GL_UNSIGNED_SHORT, 0); -// -//#if CC_REBIND_INDICES_BUFFER -// glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); -//#endif -// } -// else -// { -// // -// // Using VBO without VAO -// // -// -// #define kQuadSize sizeof(_quads[0].bl) -// -// GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX ); -// -// glBindBuffer(GL_ARRAY_BUFFER, _buffersVBO[0]); -// // vertices -// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, vertices)); -// // colors -// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, colors)); -// // tex coords -// glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORDS, 2, GL_FLOAT, GL_FALSE, kQuadSize, (GLvoid*) offsetof( V3F_C4B_T2F, texCoords)); -// -// glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); -// -// glDrawElements(GL_TRIANGLES, (GLsizei) _particleIdx*6, GL_UNSIGNED_SHORT, 0); -// -// glBindBuffer(GL_ARRAY_BUFFER, 0); -// glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); -// } -// -// CC_INCREMENT_GL_DRAWS(1); -// CHECK_GL_ERROR_DEBUG(); -//} - -void ParticleSystemQuad::draw() +void ParticleSystemQuad::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { CCASSERT( _particleIdx == _particleCount, "Abnormal error in particle quad"); //quad command if(_particleIdx > 0) { -// //transform vertices -// std::vector drawQuads(_particleIdx); -// memcpy(&drawQuads[0], _quads, sizeof(V3F_C4B_T2F_Quad) * _particleIdx); -// AffineTransform worldTM = getNodeToWorldTransform(); -// for(int index = 0; index <_particleIdx; ++index) -// { -// V3F_C4B_T2F_Quad* quad = _quads + index; -// -// Point pt(0,0); -// pt = PointApplyAffineTransform( Point(quad->bl.vertices.x, quad->bl.vertices.y), worldTM); -// drawQuads[index].bl.vertices.x = pt.x; -// drawQuads[index].bl.vertices.y = pt.y; -// -// pt = PointApplyAffineTransform( Point(quad->br.vertices.x, quad->br.vertices.y), worldTM); -// drawQuads[index].br.vertices.x = pt.x; -// drawQuads[index].br.vertices.y = pt.y; -// -// pt = PointApplyAffineTransform( Point(quad->tl.vertices.x, quad->tl.vertices.y), worldTM); -// drawQuads[index].tl.vertices.x = pt.x; -// drawQuads[index].tl.vertices.y = pt.y; -// -// pt = PointApplyAffineTransform( Point(quad->tr.vertices.x, quad->tr.vertices.y), worldTM); -// drawQuads[index].tr.vertices.x = pt.x; -// drawQuads[index].tr.vertices.y = pt.y; -// -// } - auto shader = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP); _quadCommand.init(_globalZOrder, _texture->getName(), shader, _blendFunc, _quads, _particleIdx, _modelViewTransform); Director::getInstance()->getRenderer()->addCommand(&_quadCommand); } - } void ParticleSystemQuad::setTotalParticles(int tp) diff --git a/cocos/2d/CCParticleSystemQuad.h b/cocos/2d/CCParticleSystemQuad.h index f9974281bb..db858ca1e4 100644 --- a/cocos/2d/CCParticleSystemQuad.h +++ b/cocos/2d/CCParticleSystemQuad.h @@ -104,7 +104,7 @@ public: * @js NA * @lua NA */ - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; /** * @js NA diff --git a/cocos/2d/CCProgressTimer.cpp b/cocos/2d/CCProgressTimer.cpp index 8485330254..4b8097f3b5 100644 --- a/cocos/2d/CCProgressTimer.cpp +++ b/cocos/2d/CCProgressTimer.cpp @@ -550,7 +550,7 @@ void ProgressTimer::onDraw() } } -void ProgressTimer::draw() +void ProgressTimer::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if( ! _vertexData || ! _sprite) return; diff --git a/cocos/2d/CCProgressTimer.h b/cocos/2d/CCProgressTimer.h index 5ca74f5458..f19c08367f 100644 --- a/cocos/2d/CCProgressTimer.h +++ b/cocos/2d/CCProgressTimer.h @@ -111,7 +111,7 @@ public: inline Point getBarChangeRate() const { return _barChangeRate; } // Overrides - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void setAnchorPoint(const Point& anchorPoint) override; virtual void setColor(const Color3B &color) override; virtual const Color3B& getColor() const override; diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index fede04c4c3..0b2397b866 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -361,7 +361,7 @@ void RenderTexture::clearStencil(int stencilValue) glClearStencil(stencilClearValue); } -void RenderTexture::visit() +void RenderTexture::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // override visit. // Don't call visit on its children @@ -371,10 +371,13 @@ void RenderTexture::visit() } kmGLPushMatrix(); - - transform(); - _sprite->visit(); - draw(); + + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); + + _sprite->visit(renderer, _modelViewTransform, dirty); + draw(renderer, _modelViewTransform, dirty); kmGLPopMatrix(); @@ -610,7 +613,7 @@ void RenderTexture::onClearDepth() glClearDepth(depthClearValue); } -void RenderTexture::draw() +void RenderTexture::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if (_autoDraw) { @@ -620,7 +623,7 @@ void RenderTexture::draw() //clear screen _clearCommand.init(_globalZOrder); _clearCommand.func = CC_CALLBACK_0(RenderTexture::onClear, this); - Director::getInstance()->getRenderer()->addCommand(&_clearCommand); + renderer->addCommand(&_clearCommand); //! make sure all children are drawn sortAllChildren(); @@ -628,7 +631,7 @@ void RenderTexture::draw() for(const auto &child: _children) { if (child != _sprite) - child->visit(); + child->visit(renderer, transform, transformDirty); } //End will pop the current render group diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 0d25d91002..5ccd0ae25f 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -154,8 +154,8 @@ public: }; // Overrides - virtual void visit() override; - virtual void draw() override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; public: // XXX should be procted. diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index 4fee1b92d8..c39b202a7b 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -586,7 +586,7 @@ void Sprite::updateTransform(void) // draw -void Sprite::draw(void) +void Sprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if(isInsideBounds()) { diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index db96bb871e..f79abdb9db 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -424,7 +424,7 @@ public: virtual void setAnchorPoint(const Point& anchor) override; virtual void ignoreAnchorPointForPosition(bool value) override; virtual void setVisible(bool bVisible) override; - virtual void draw(void) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void setOpacityModifyRGB(bool modify) override; virtual bool isOpacityModifyRGB(void) const override; /// @} diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index ef91137a19..2c813aaeaa 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -131,7 +131,7 @@ SpriteBatchNode::~SpriteBatchNode() // override visit // don't call visit on it's children -void SpriteBatchNode::visit(void) +void SpriteBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { CC_PROFILER_START_CATEGORY(kProfilerCategoryBatchSprite, "CCSpriteBatchNode - visit"); @@ -150,9 +150,12 @@ void SpriteBatchNode::visit(void) kmGLPushMatrix(); sortAllChildren(); - transform(); - draw(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); + + draw(renderer, _modelViewTransform, dirty); kmGLPopMatrix(); setOrderOfArrival(0); @@ -345,7 +348,7 @@ void SpriteBatchNode::reorderBatch(bool reorder) _reorderChildDirty=reorder; } -void SpriteBatchNode::draw() +void SpriteBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { // Optimization: Fast Dispatch if( _textureAtlas->getTotalQuads() == 0 ) diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index 26b712565c..24f4f90c60 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -155,7 +155,7 @@ public: */ virtual const BlendFunc& getBlendFunc() const override; - virtual void visit() override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; @@ -164,7 +164,7 @@ public: virtual void removeChild(Node *child, bool cleanup) override; virtual void removeAllChildrenWithCleanup(bool cleanup) override; virtual void sortAllChildren() override; - virtual void draw(void) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string getDescription() const override; /** Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array. diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index cb82c88be6..8b7c06cecb 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -242,7 +242,7 @@ const std::string& TextFieldTTF::getContentText() return _inputText; } -void TextFieldTTF::draw() +void TextFieldTTF::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if (_delegate && _delegate->onDraw(this)) { @@ -250,14 +250,14 @@ void TextFieldTTF::draw() } if (_inputText.length()) { - LabelTTF::draw(); + LabelTTF::draw(renderer, transform, transformDirty); return; } // draw placeholder Color3B color = getColor(); setColor(_colorSpaceHolder); - LabelTTF::draw(); + LabelTTF::draw(renderer, transform, transformDirty); setColor(color); } diff --git a/cocos/2d/CCTextFieldTTF.h b/cocos/2d/CCTextFieldTTF.h index b1a69ba6b2..6aa6ffd2a3 100644 --- a/cocos/2d/CCTextFieldTTF.h +++ b/cocos/2d/CCTextFieldTTF.h @@ -173,7 +173,7 @@ protected: bool _secureTextEntry; protected: - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; ////////////////////////////////////////////////////////////////////////// // IMEDelegate interface diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index ed22b68651..0dac8352c8 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -97,16 +97,16 @@ void TransitionScene::sceneOrder() _isInSceneOnTop = true; } -void TransitionScene::draw() +void TransitionScene::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Scene::draw(); + Scene::draw(renderer, transform, transformDirty); if( _isInSceneOnTop ) { - _outScene->visit(); - _inScene->visit(); + _outScene->visit(renderer, transform, transformDirty); + _inScene->visit(renderer, transform, transformDirty); } else { - _inScene->visit(); - _outScene->visit(); + _inScene->visit(renderer, transform, transformDirty); + _outScene->visit(renderer, transform, transformDirty); } } @@ -1258,7 +1258,7 @@ TransitionCrossFade* TransitionCrossFade::create(float t, Scene* scene) return nullptr; } -void TransitionCrossFade::draw() +void TransitionCrossFade::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { // override draw since both scenes (textures) are rendered in 1 scene } @@ -1407,19 +1407,19 @@ void TransitionTurnOffTiles::onExit() TransitionScene::onExit(); } -void TransitionTurnOffTiles::draw() +void TransitionTurnOffTiles::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Scene::draw(); + Scene::draw(renderer, transform, transformDirty); if( _isInSceneOnTop ) { - _outSceneProxy->visit(); - _inScene->visit(); + _outSceneProxy->visit(renderer, transform, transformDirty); + _inScene->visit(renderer, transform, transformDirty); } else { - _inScene->visit(); - _outSceneProxy->visit(); + _inScene->visit(renderer, transform, transformDirty); + _outSceneProxy->visit(renderer, transform, transformDirty); } } @@ -1487,10 +1487,10 @@ void TransitionSplitCols::switchTargetToInscene() _gridProxy->setTarget(_inScene); } -void TransitionSplitCols::draw() +void TransitionSplitCols::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Scene::draw(); - _gridProxy->visit(); + Scene::draw(renderer, transform, transformDirty); + _gridProxy->visit(renderer, transform, transformDirty); } void TransitionSplitCols::onExit() @@ -1603,19 +1603,19 @@ void TransitionFadeTR::onExit() TransitionScene::onExit(); } -void TransitionFadeTR::draw() +void TransitionFadeTR::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Scene::draw(); + Scene::draw(renderer, transform, transformDirty); if( _isInSceneOnTop ) { - _outSceneProxy->visit(); - _inScene->visit(); + _outSceneProxy->visit(renderer, transform, transformDirty); + _inScene->visit(renderer, transform, transformDirty); } else { - _inScene->visit(); - _outSceneProxy->visit(); + _inScene->visit(renderer, transform, transformDirty); + _outSceneProxy->visit(renderer, transform, transformDirty); } } diff --git a/cocos/2d/CCTransition.h b/cocos/2d/CCTransition.h index 851ca4f375..29989f819b 100644 --- a/cocos/2d/CCTransition.h +++ b/cocos/2d/CCTransition.h @@ -91,7 +91,7 @@ public: // // Overrides // - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void onEnter() override; virtual void onExit() override; virtual void cleanup() override; @@ -609,7 +609,7 @@ public : * @js NA * @lua NA */ - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; /** * @js NA * @lua NA @@ -647,7 +647,7 @@ public : virtual void onEnter() override; virtual void onExit() override; virtual ActionInterval * easeActionWithAction(ActionInterval * action) override; - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: TransitionTurnOffTiles(); @@ -680,7 +680,7 @@ public: virtual void onEnter() override; virtual ActionInterval * easeActionWithAction(ActionInterval * action) override; virtual void onExit() override; - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: TransitionSplitCols(); virtual ~TransitionSplitCols(); @@ -731,7 +731,7 @@ public: virtual void onEnter() override; virtual ActionInterval* easeActionWithAction(ActionInterval * action) override; virtual void onExit() override; - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: TransitionFadeTR(); virtual ~TransitionFadeTR(); diff --git a/cocos/2d/CCTransitionPageTurn.cpp b/cocos/2d/CCTransitionPageTurn.cpp index 7e4102b009..d7780ae8ce 100644 --- a/cocos/2d/CCTransitionPageTurn.cpp +++ b/cocos/2d/CCTransitionPageTurn.cpp @@ -92,27 +92,27 @@ void TransitionPageTurn::onDisablePolygonOffset() glPolygonOffset(0, 0); } -void TransitionPageTurn::draw() +void TransitionPageTurn::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Scene::draw(); + Scene::draw(renderer, transform, transformDirty); if( _isInSceneOnTop ) { - _outSceneProxy->visit(); + _outSceneProxy->visit(renderer, transform, transformDirty); _enableOffsetCmd.init(_globalZOrder); _enableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onEnablePolygonOffset, this); Director::getInstance()->getRenderer()->addCommand(&_enableOffsetCmd); - _inSceneProxy->visit(); + _inSceneProxy->visit(renderer, transform, transformDirty); _disableOffsetCmd.init(_globalZOrder); _disableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onDisablePolygonOffset, this); Director::getInstance()->getRenderer()->addCommand(&_disableOffsetCmd); } else { - _inSceneProxy->visit(); + _inSceneProxy->visit(renderer, transform, transformDirty); _enableOffsetCmd.init(_globalZOrder); _enableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onEnablePolygonOffset, this); Director::getInstance()->getRenderer()->addCommand(&_enableOffsetCmd); - _outSceneProxy->visit(); + _outSceneProxy->visit(renderer, transform, transformDirty); _disableOffsetCmd.init(_globalZOrder); _disableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onDisablePolygonOffset, this); diff --git a/cocos/2d/CCTransitionPageTurn.h b/cocos/2d/CCTransitionPageTurn.h index f422ef0b82..f65a66f2cd 100644 --- a/cocos/2d/CCTransitionPageTurn.h +++ b/cocos/2d/CCTransitionPageTurn.h @@ -72,7 +72,7 @@ public: // // Overrides // - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; /** * Creates a base transition with duration and incoming scene. diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index 80d6a4dca7..c08ed2a87f 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -378,7 +378,7 @@ void Armature::update(float dt) _armatureTransformDirty = false; } -void Armature::draw() +void Armature::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if (_parentBone == nullptr && _batchNode == nullptr) { @@ -408,17 +408,17 @@ void Armature::draw() { skin->setBlendFunc(bone->getBlendFunc()); } - skin->draw(); + skin->draw(renderer, transform, transformDirty); } break; case CS_DISPLAY_ARMATURE: { - node->draw(); + node->draw(renderer, transform, transformDirty); } break; default: { - node->visit(); + node->visit(renderer, transform, transformDirty); CC_NODE_DRAW_SETUP(); } break; @@ -426,7 +426,7 @@ void Armature::draw() } else if(Node *node = dynamic_cast(object)) { - node->visit(); + node->visit(renderer, transform, transformDirty); CC_NODE_DRAW_SETUP(); } } @@ -445,7 +445,7 @@ void Armature::onExit() } -void Armature::visit() +void Armature::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -454,9 +454,11 @@ void Armature::visit() } kmGLPushMatrix(); - transform(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); sortAllChildren(); - draw(); + draw(renderer, _modelViewTransform, dirty); // reset for next frame _orderOfArrival = 0; diff --git a/cocos/editor-support/cocostudio/CCArmature.h b/cocos/editor-support/cocostudio/CCArmature.h index 4f9ee41555..ae5d9e1031 100644 --- a/cocos/editor-support/cocostudio/CCArmature.h +++ b/cocos/editor-support/cocostudio/CCArmature.h @@ -156,9 +156,9 @@ public: * @js NA * @lua NA */ - virtual void visit() override; + virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void update(float dt) override; - virtual void draw() override; virtual void onEnter() override; virtual void onExit() override; diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index 752e4911a9..6b2815b099 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -101,7 +101,7 @@ void BatchNode::removeChild(Node* child, bool cleanup) Node::removeChild(child, cleanup); } -void BatchNode::visit() +void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -110,9 +110,12 @@ void BatchNode::visit() } kmGLPushMatrix(); - transform(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); + sortAllChildren(); - draw(); + draw(renderer, _modelViewTransform, dirty); // reset for next frame _orderOfArrival = 0; @@ -120,7 +123,7 @@ void BatchNode::visit() kmGLPopMatrix(); } -void BatchNode::draw() +void BatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if (_children.empty()) { @@ -141,14 +144,14 @@ void BatchNode::draw() pushed = true; } - armature->visit(); + armature->visit(renderer, transform, transformDirty); } else { Director::getInstance()->getRenderer()->popGroup(); pushed = false; - ((Node *)object)->visit(); + ((Node *)object)->visit(renderer, transform, transformDirty); } } } diff --git a/cocos/editor-support/cocostudio/CCBatchNode.h b/cocos/editor-support/cocostudio/CCBatchNode.h index f0ce41df2f..d08f134283 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.h +++ b/cocos/editor-support/cocostudio/CCBatchNode.h @@ -56,15 +56,8 @@ public: virtual void addChild(cocos2d::Node *pChild, int zOrder) override; virtual void addChild(cocos2d::Node *pChild, int zOrder, int tag) override; virtual void removeChild(cocos2d::Node* child, bool cleanup) override; - /** - * @js NA - * @lua NA - */ - virtual void visit() override; - /** - * @js NA - */ - void draw() override; + virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: void generateGroupCommand(); diff --git a/cocos/editor-support/cocostudio/CCSkin.cpp b/cocos/editor-support/cocostudio/CCSkin.cpp index fa46e5197e..f6656cee62 100644 --- a/cocos/editor-support/cocostudio/CCSkin.cpp +++ b/cocos/editor-support/cocostudio/CCSkin.cpp @@ -219,7 +219,7 @@ kmMat4 Skin::getNodeToWorldTransformAR() const return TransformConcat( _bone->getArmature()->getNodeToWorldTransform(),displayTransform); } -void Skin::draw() +void Skin::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { kmMat4 mv; kmGLGetMatrix(KM_GL_MODELVIEW, &mv); diff --git a/cocos/editor-support/cocostudio/CCSkin.h b/cocos/editor-support/cocostudio/CCSkin.h index 4798b2345b..29583892b6 100644 --- a/cocos/editor-support/cocostudio/CCSkin.h +++ b/cocos/editor-support/cocostudio/CCSkin.h @@ -54,7 +54,7 @@ public: kmMat4 getNodeToWorldTransform() const override; kmMat4 getNodeToWorldTransformAR() const; - virtual void draw() override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; /** * @js NA diff --git a/cocos/editor-support/spine/CCSkeleton.cpp b/cocos/editor-support/spine/CCSkeleton.cpp index 9254b5dddf..13cabe6556 100644 --- a/cocos/editor-support/spine/CCSkeleton.cpp +++ b/cocos/editor-support/spine/CCSkeleton.cpp @@ -126,7 +126,7 @@ void Skeleton::update (float deltaTime) { spSkeleton_update(skeleton, deltaTime * timeScale); } -void Skeleton::draw() +void Skeleton::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); diff --git a/cocos/editor-support/spine/CCSkeleton.h b/cocos/editor-support/spine/CCSkeleton.h index 23c70101b3..f0121d0261 100644 --- a/cocos/editor-support/spine/CCSkeleton.h +++ b/cocos/editor-support/spine/CCSkeleton.h @@ -67,7 +67,7 @@ public: virtual ~Skeleton (); virtual void update (float deltaTime) override; - virtual void draw() override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; void onDraw(); virtual cocos2d::Rect getBoundingBox () const override; diff --git a/cocos/gui/UILayout.cpp b/cocos/gui/UILayout.cpp index 68356e2d5e..9eb8723ad2 100644 --- a/cocos/gui/UILayout.cpp +++ b/cocos/gui/UILayout.cpp @@ -167,7 +167,7 @@ bool Layout::hitTest(const Point &pt) return false; } -void Layout::visit() +void Layout::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { if (!_enabled) { @@ -178,10 +178,10 @@ void Layout::visit() switch (_clippingType) { case LAYOUT_CLIPPING_STENCIL: - stencilClippingVisit(); + stencilClippingVisit(renderer, parentTransform, parentTransformDirty); break; case LAYOUT_CLIPPING_SCISSOR: - scissorClippingVisit(); + scissorClippingVisit(renderer, parentTransform, parentTransformDirty); break; default: break; @@ -189,7 +189,7 @@ void Layout::visit() } else { - Node::visit(); + Node::visit(renderer, parentTransform, parentTransformDirty); } } @@ -199,17 +199,17 @@ void Layout::sortAllChildren() doLayout(); } -void Layout::stencilClippingVisit() +void Layout::stencilClippingVisit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { if(!_visible) return; kmGLPushMatrix(); - transform(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + transform(); //Add group command - - Renderer* renderer = Director::getInstance()->getRenderer(); - + _groupCommand.init(_globalZOrder); renderer->addCommand(&_groupCommand); @@ -219,7 +219,7 @@ void Layout::stencilClippingVisit() _beforeVisitCmdStencil.func = CC_CALLBACK_0(Layout::onBeforeVisitStencil, this); renderer->addCommand(&_beforeVisitCmdStencil); - _clippingStencil->visit(); + _clippingStencil->visit(renderer, _modelViewTransform, dirty); _afterDrawStencilCmd.init(_globalZOrder); _afterDrawStencilCmd.func = CC_CALLBACK_0(Layout::onAfterDrawStencil, this); @@ -236,19 +236,19 @@ void Layout::stencilClippingVisit() auto node = _children.at(i); if ( node && node->getLocalZOrder() < 0 ) - node->visit(); + node->visit(renderer, _modelViewTransform, dirty); else break; } // self draw - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); for(auto it=_children.cbegin()+i; it != _children.cend(); ++it) - (*it)->visit(); + (*it)->visit(renderer, _modelViewTransform, dirty); } else { - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); } _afterVisitCmdStencil.init(_globalZOrder); @@ -333,15 +333,13 @@ void Layout::onAfterVisitScissor() glDisable(GL_SCISSOR_TEST); } -void Layout::scissorClippingVisit() +void Layout::scissorClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty) { - Renderer* renderer = Director::getInstance()->getRenderer(); - _beforeVisitCmdScissor.init(_globalZOrder); _beforeVisitCmdScissor.func = CC_CALLBACK_0(Layout::onBeforeVisitScissor, this); renderer->addCommand(&_beforeVisitCmdScissor); - Node::visit(); + Node::visit(renderer, parentTransform, parentTransformDirty); _afterVisitCmdScissor.init(_globalZOrder); _afterVisitCmdScissor.func = CC_CALLBACK_0(Layout::onAfterVisitScissor, this); diff --git a/cocos/gui/UILayout.h b/cocos/gui/UILayout.h index 9408505b5b..48eeff5870 100644 --- a/cocos/gui/UILayout.h +++ b/cocos/gui/UILayout.h @@ -209,7 +209,7 @@ public: */ virtual void addChild(Node* child, int zOrder, int tag) override; - virtual void visit(); + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; virtual void sortAllChildren() override; @@ -234,8 +234,8 @@ protected: virtual void copySpecialProperties(Widget* model) override; virtual void copyClonedWidgetChildren(Widget* model) override; - void stencilClippingVisit(); - void scissorClippingVisit(); + void stencilClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty); + void scissorClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty); void setStencilClippingSize(const Size& size); const Rect& getClippingRect(); diff --git a/cocos/gui/UIWidget.cpp b/cocos/gui/UIWidget.cpp index 25c4a72859..211ccb48c5 100644 --- a/cocos/gui/UIWidget.cpp +++ b/cocos/gui/UIWidget.cpp @@ -108,11 +108,11 @@ void Widget::onExit() Node::onExit(); } -void Widget::visit() +void Widget::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { if (_enabled) { - Node::visit(); + Node::visit(renderer, parentTransform, parentTransformDirty); } } diff --git a/cocos/gui/UIWidget.h b/cocos/gui/UIWidget.h index d0852f64f4..9d1f925afa 100644 --- a/cocos/gui/UIWidget.h +++ b/cocos/gui/UIWidget.h @@ -331,7 +331,7 @@ public: virtual void removeAllNodes(); - virtual void visit() override; + virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; /** * Sets the touch event target/selector of the menu item diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp index 9f1a19e813..b25ea9bfac 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp @@ -769,14 +769,14 @@ void Scale9Sprite::setInsetBottom(float insetBottom) this->updateCapInset(); } -void Scale9Sprite::visit() +void Scale9Sprite::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { if(this->_positionsAreDirty) { this->updatePositions(); this->_positionsAreDirty = false; } - Node::visit(); + Node::visit(renderer, parentTransform, parentTransformDirty); } void Scale9Sprite::setColor(const Color3B& color) diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.h b/extensions/GUI/CCControlExtension/CCScale9Sprite.h index fbeca870eb..c66949f515 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.h +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.h @@ -261,7 +261,7 @@ public: * @js NA * @lua NA */ - virtual void visit() override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; virtual void setOpacityModifyRGB(bool bValue) override; virtual bool isOpacityModifyRGB(void) const override; virtual void setOpacity(GLubyte opacity) override; diff --git a/extensions/GUI/CCEditBox/CCEditBox.cpp b/extensions/GUI/CCEditBox/CCEditBox.cpp index dda578f421..01df63ace1 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.cpp +++ b/extensions/GUI/CCEditBox/CCEditBox.cpp @@ -316,9 +316,9 @@ void EditBox::setAnchorPoint(const Point& anchorPoint) } } -void EditBox::visit(void) +void EditBox::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { - ControlButton::visit(); + ControlButton::visit(renderer, parentTransform, parentTransformDirty); if (_editBoxImpl != NULL) { _editBoxImpl->visit(); diff --git a/extensions/GUI/CCEditBox/CCEditBox.h b/extensions/GUI/CCEditBox/CCEditBox.h index 675dda2bfe..eb05e7a1a7 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.h +++ b/extensions/GUI/CCEditBox/CCEditBox.h @@ -379,7 +379,7 @@ public: * @js NA * @lua NA */ - virtual void visit(void) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; /** * @js NA * @lua NA diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index 0137a6bfe7..b8914f6447 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -552,7 +552,7 @@ void ScrollView::onAfterDraw() } } -void ScrollView::visit() +void ScrollView::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) { // quick return if not visible if (!isVisible()) @@ -562,7 +562,10 @@ void ScrollView::visit() kmGLPushMatrix(); - this->transform(); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + this->transform(); + this->beforeDraw(); if (!_children.empty()) @@ -575,7 +578,7 @@ void ScrollView::visit() Node *child = _children.at(i); if ( child->getLocalZOrder() < 0 ) { - child->visit(); + child->visit(renderer, _modelViewTransform, dirty); } else { @@ -584,19 +587,19 @@ void ScrollView::visit() } // this draw - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); // draw children zOrder >= 0 for( ; i < _children.size(); i++ ) { Node *child = _children.at(i); - child->visit(); + child->visit(renderer, _modelViewTransform, dirty); } } else { - this->draw(); + this->draw(renderer, _modelViewTransform, dirty); } this->afterDraw(); diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index b467b5274f..0ec96b5049 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -225,7 +225,7 @@ public: * @js NA * @lua NA */ - virtual void visit() override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.cpp b/extensions/physics-nodes/CCPhysicsDebugNode.cpp index 34a989da5a..f1f5cdb0b6 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.cpp +++ b/extensions/physics-nodes/CCPhysicsDebugNode.cpp @@ -182,7 +182,7 @@ static void DrawConstraint(cpConstraint *constraint, DrawNode *renderer) // implementation of PhysicsDebugNode -void PhysicsDebugNode::draw() +void PhysicsDebugNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { if (! _spacePtr) { @@ -192,7 +192,7 @@ void PhysicsDebugNode::draw() cpSpaceEachShape(_spacePtr, (cpSpaceShapeIteratorFunc)DrawShape, this); cpSpaceEachConstraint(_spacePtr, (cpSpaceConstraintIteratorFunc)DrawConstraint, this); - DrawNode::draw(); + DrawNode::draw(renderer, transform, transformDirty); DrawNode::clear(); #endif } diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.h b/extensions/physics-nodes/CCPhysicsDebugNode.h index ab49107b7b..d39cf3376b 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.h +++ b/extensions/physics-nodes/CCPhysicsDebugNode.h @@ -61,7 +61,7 @@ public: void setSpace(cpSpace *space); // Overrides - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: cpSpace *_spacePtr; diff --git a/tests/Classes/ActionsTest/ActionsTest.cpp b/tests/Classes/ActionsTest/ActionsTest.cpp index e0fddfec18..0e9167f2a0 100644 --- a/tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/Classes/ActionsTest/ActionsTest.cpp @@ -33,8 +33,6 @@ static std::function createFunctions[] = { - CL(ActionRotateBy3D), - CL(ActionManual), CL(ActionMove), CL(ActionRotate), @@ -1344,7 +1342,7 @@ void ActionFollow::onEnter() this->runAction(Follow::create(_grossini, Rect(0, 0, s.width * 2 - 100, s.height))); } -void ActionFollow::draw() +void ActionFollow::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ActionFollow::onDraw, this); @@ -1651,9 +1649,9 @@ ActionCatmullRomStacked::~ActionCatmullRomStacked() CC_SAFE_RELEASE(_array2); } -void ActionCatmullRomStacked::draw() +void ActionCatmullRomStacked::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - ActionsDemo::draw(); + ActionsDemo::draw(renderer, transform, transformDirty); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -1760,9 +1758,9 @@ ActionCardinalSplineStacked::~ActionCardinalSplineStacked() CC_SAFE_RELEASE(_array); } -void ActionCardinalSplineStacked::draw() +void ActionCardinalSplineStacked::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - ActionsDemo::draw(); + ActionsDemo::draw(renderer, transform, transformDirty); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -2127,9 +2125,9 @@ ActionCatmullRom::~ActionCatmullRom() _array2->release(); } -void ActionCatmullRom::draw() +void ActionCatmullRom::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - ActionsDemo::draw(); + ActionsDemo::draw(renderer, transform, transformDirty); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -2222,9 +2220,9 @@ ActionCardinalSpline::~ActionCardinalSpline() _array->release(); } -void ActionCardinalSpline::draw() +void ActionCardinalSpline::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - ActionsDemo::draw(); + ActionsDemo::draw(renderer, transform, transformDirty); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); diff --git a/tests/Classes/ActionsTest/ActionsTest.h b/tests/Classes/ActionsTest/ActionsTest.h index 8631dc5fd6..6467961a8a 100644 --- a/tests/Classes/ActionsTest/ActionsTest.h +++ b/tests/Classes/ActionsTest/ActionsTest.h @@ -375,7 +375,7 @@ public: CREATE_FUNC(ActionFollow); virtual void onEnter() override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string subtitle() const override; protected: @@ -451,7 +451,7 @@ public: CREATE_FUNC(ActionCatmullRomStacked); virtual ~ActionCatmullRomStacked(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void onEnter() override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -472,7 +472,7 @@ public: CREATE_FUNC(ActionCardinalSplineStacked); virtual ~ActionCardinalSplineStacked(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty); virtual void onEnter() override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -567,7 +567,7 @@ public: ~ActionCatmullRom(); virtual void onEnter() override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string subtitle() const override; virtual std::string title() const override; private: @@ -588,7 +588,7 @@ public: ~ActionCardinalSpline(); virtual void onEnter() override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string subtitle() const override; virtual std::string title() const override; private: diff --git a/tests/Classes/Box2DTest/Box2dTest.cpp b/tests/Classes/Box2DTest/Box2dTest.cpp index 7a80011dc5..57f23413d9 100644 --- a/tests/Classes/Box2DTest/Box2dTest.cpp +++ b/tests/Classes/Box2DTest/Box2dTest.cpp @@ -137,14 +137,14 @@ void Box2DTestLayer::createResetButton() } -void Box2DTestLayer::draw() +void Box2DTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { // // IMPORTANT: // This is only for debug purposes // It is recommend to disable it // - Layer::draw(); + Layer::draw(renderer, transform, transformDirty); #if CC_ENABLE_BOX2D_INTEGRATION GL::enableVertexAttribs( cocos2d::GL::VERTEX_ATTRIB_FLAG_POSITION ); diff --git a/tests/Classes/Box2DTest/Box2dTest.h b/tests/Classes/Box2DTest/Box2dTest.h index 167e2f6fb5..ce7ce93503 100644 --- a/tests/Classes/Box2DTest/Box2dTest.h +++ b/tests/Classes/Box2DTest/Box2dTest.h @@ -17,7 +17,7 @@ public: void initPhysics(); void createResetButton(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; void addNewSpriteAtPosition(Point p); void update(float dt); diff --git a/tests/Classes/Box2DTestBed/Box2dView.cpp b/tests/Classes/Box2DTestBed/Box2dView.cpp index 53ab909011..277955b9d5 100644 --- a/tests/Classes/Box2DTestBed/Box2dView.cpp +++ b/tests/Classes/Box2DTestBed/Box2dView.cpp @@ -207,9 +207,9 @@ void Box2DView::tick(float dt) m_test->Step(&settings); } -void Box2DView::draw() +void Box2DView::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Layer::draw(); + Layer::draw(renderer, transform, transformDirty); _customCmd.init(_globalZOrder); _customCmd.func = CC_CALLBACK_0(Box2DView::onDraw, this); diff --git a/tests/Classes/Box2DTestBed/Box2dView.h b/tests/Classes/Box2DTestBed/Box2dView.h index 8316e98263..3e95cda7bd 100644 --- a/tests/Classes/Box2DTestBed/Box2dView.h +++ b/tests/Classes/Box2DTestBed/Box2dView.h @@ -42,7 +42,7 @@ public: bool initWithEntryID(int entryId); std::string title() const; void tick(float dt); - void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; // virtual void registerWithTouchDispatcher(); bool onTouchBegan(Touch* touch, Event* event); diff --git a/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp index 9d69a16fce..59d1c8e2d0 100644 --- a/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp +++ b/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp @@ -596,13 +596,12 @@ void RawStencilBufferTest::setup() Director::getInstance()->setAlphaBlending(true); } -void RawStencilBufferTest::draw() +void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { auto winPoint = Point(Director::getInstance()->getWinSize()); auto planeSize = winPoint * (1.0 / _planeCount); - Renderer *renderer = Director::getInstance()->getRenderer(); size_t neededCmdSize = _planeCount * 2 + 2; if(_renderCmds.size() != neededCmdSize) { @@ -635,7 +634,7 @@ void RawStencilBufferTest::draw() kmGLPushMatrix(); this->transform(); - _sprites.at(i)->visit(); + _sprites.at(i)->visit(renderer, _modelViewTransform, transformDirty); kmGLPopMatrix(); iter->init(_globalZOrder); @@ -645,7 +644,7 @@ void RawStencilBufferTest::draw() kmGLPushMatrix(); this->transform(); - _sprites.at(i)->visit(); + _sprites.at(i)->visit(renderer, _modelViewTransform, transformDirty); kmGLPopMatrix(); } diff --git a/tests/Classes/ClippingNodeTest/ClippingNodeTest.h b/tests/Classes/ClippingNodeTest/ClippingNodeTest.h index 0c3ad9e2ee..ed82143233 100644 --- a/tests/Classes/ClippingNodeTest/ClippingNodeTest.h +++ b/tests/Classes/ClippingNodeTest/ClippingNodeTest.h @@ -153,7 +153,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void setup(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void setupStencilForClippingOnPlane(GLint plane); virtual void setupStencilForDrawingOnPlane(GLint plane); diff --git a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp index 64bfe1bbfb..7439490fbf 100644 --- a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp +++ b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp @@ -114,7 +114,7 @@ DrawPrimitivesTest::DrawPrimitivesTest() { } -void DrawPrimitivesTest::draw() +void DrawPrimitivesTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(DrawPrimitivesTest::onDraw, this); diff --git a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h index 259833970c..8534d23894 100644 --- a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h +++ b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h @@ -27,7 +27,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: void onDraw(); protected: diff --git a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp index c54aab1d8c..adc4a84ac9 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp +++ b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp @@ -845,7 +845,7 @@ void TestColliderDetector::onExit() ArmatureTestLayer::onExit(); } -void TestColliderDetector::draw() +void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION ); kmGLPushMatrix(); @@ -1065,7 +1065,7 @@ void TestColliderDetector::update(float delta) } } } -void TestColliderDetector::draw() +void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(TestColliderDetector::onDraw, this); @@ -1106,7 +1106,7 @@ std::string TestBoundingBox::title() const { return "Test BoundingBox"; } -void TestBoundingBox::draw() +void TestBoundingBox::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(TestBoundingBox::onDraw, this); diff --git a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h index 3310b1ef96..1add61178f 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h +++ b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h @@ -211,7 +211,7 @@ public: virtual void onEnter() override; virtual void onExit() override; virtual std::string title() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual void update(float delta); void onFrameEvent(cocostudio::Bone *bone, const std::string& evt, int originFrameIndex, int currentFrameIndex); @@ -270,7 +270,7 @@ public: virtual void onEnter() override; virtual std::string title() const override; virtual void update(float delta); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; void onDraw(); void onFrameEvent(cocostudio::Bone *bone, const std::string& evt, int originFrameIndex, int currentFrameIndex); @@ -293,7 +293,7 @@ class TestBoundingBox : public ArmatureTestLayer public: virtual void onEnter() override; virtual std::string title() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; cocostudio::Armature *armature; Rect rect; diff --git a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp index ba62d07ffe..cc2523b01d 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp +++ b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp @@ -194,9 +194,9 @@ void SceneEditorTestLayer::backCallback(Ref *pSender) s->release(); } -void SceneEditorTestLayer::draw() +void SceneEditorTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - Layer::draw(); + Layer::draw(renderer, transform, transformDirty); } diff --git a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h index 87f7be76dd..523b8f9840 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h +++ b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h @@ -43,7 +43,7 @@ public: virtual void nextCallback(cocos2d::Ref* pSender); virtual void backCallback(cocos2d::Ref* pSender); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: MenuItemImage *restartItem; diff --git a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp index caad90a6fa..f90354d4bd 100644 --- a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp +++ b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp @@ -2,9 +2,9 @@ USING_NS_CC; -void CustomTableViewCell::draw() +void CustomTableViewCell::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - TableViewCell::draw(); + TableViewCell::draw(renderer, transform, transformDirty); // draw bounding box // auto pos = getPosition(); // auto size = Size(178, 200); diff --git a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h index 2ee951ca73..a82d74375a 100644 --- a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h +++ b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h @@ -7,7 +7,7 @@ class CustomTableViewCell : public cocos2d::extension::TableViewCell { public: - virtual void draw(); + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; }; #endif /* __CUSTOMTABELVIEWCELL_H__ */ diff --git a/tests/Classes/LabelTest/LabelTest.cpp b/tests/Classes/LabelTest/LabelTest.cpp index 2f82279909..554cc5bda9 100644 --- a/tests/Classes/LabelTest/LabelTest.cpp +++ b/tests/Classes/LabelTest/LabelTest.cpp @@ -205,7 +205,7 @@ Atlas1::~Atlas1() _textureAtlas->release(); } -void Atlas1::draw() +void Atlas1::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { // GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY // GL_TEXTURE_2D @@ -528,7 +528,7 @@ Atlas4::Atlas4() schedule( schedule_selector(Atlas4::step), 0.1f); } -void Atlas4::draw() +void Atlas4::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Atlas4::onDraw, this); @@ -1614,7 +1614,7 @@ std::string LabelBMFontBounds::subtitle() const return "You should see string enclosed by a box"; } -void LabelBMFontBounds::draw() +void LabelBMFontBounds::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(LabelBMFontBounds::onDraw, this); diff --git a/tests/Classes/LabelTest/LabelTest.h b/tests/Classes/LabelTest/LabelTest.h index 33f388fb62..fcc18d37c1 100644 --- a/tests/Classes/LabelTest/LabelTest.h +++ b/tests/Classes/LabelTest/LabelTest.h @@ -35,7 +35,7 @@ public: ~Atlas1(); virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: void onDraw(); protected: @@ -102,7 +102,7 @@ public: Atlas4(); virtual void step(float dt); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -377,7 +377,7 @@ public: LabelBMFontBounds(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string title() const override; virtual std::string subtitle() const override; protected: diff --git a/tests/Classes/LabelTest/LabelTestNew.cpp b/tests/Classes/LabelTest/LabelTestNew.cpp index b68469b9aa..e1c320bae9 100644 --- a/tests/Classes/LabelTest/LabelTestNew.cpp +++ b/tests/Classes/LabelTest/LabelTestNew.cpp @@ -309,7 +309,7 @@ LabelFNTSpriteActions::LabelFNTSpriteActions() schedule( schedule_selector(LabelFNTSpriteActions::step), 0.1f); } -void LabelFNTSpriteActions::draw() +void LabelFNTSpriteActions::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(LabelFNTSpriteActions::onDraw, this); @@ -926,7 +926,7 @@ std::string LabelFNTBounds::subtitle() const return "You should see string enclosed by a box"; } -void LabelFNTBounds::draw() +void LabelFNTBounds::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(LabelFNTBounds::onDraw, this); @@ -1515,7 +1515,7 @@ void LabelTTFOldNew::onDraw() kmGLLoadMatrix(&oldMat); } -void LabelTTFOldNew::draw() +void LabelTTFOldNew::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(LabelTTFOldNew::onDraw, this); diff --git a/tests/Classes/LabelTest/LabelTestNew.h b/tests/Classes/LabelTest/LabelTestNew.h index bad662147f..b567056a9d 100644 --- a/tests/Classes/LabelTest/LabelTestNew.h +++ b/tests/Classes/LabelTest/LabelTestNew.h @@ -57,7 +57,7 @@ public: LabelFNTSpriteActions(); virtual void step(float dt); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -222,7 +222,7 @@ public: LabelFNTBounds(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string title() const override; virtual std::string subtitle() const override; private: @@ -411,7 +411,7 @@ public: LabelTTFOldNew(); - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string title() const override; virtual std::string subtitle() const override; diff --git a/tests/Classes/MutiTouchTest/MutiTouchTest.cpp b/tests/Classes/MutiTouchTest/MutiTouchTest.cpp index 0eabeea4b4..23933b76b4 100644 --- a/tests/Classes/MutiTouchTest/MutiTouchTest.cpp +++ b/tests/Classes/MutiTouchTest/MutiTouchTest.cpp @@ -17,7 +17,7 @@ public: setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); } - virtual void draw() + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { DrawPrimitives::setDrawColor4B(_touchColor.r, _touchColor.g, _touchColor.b, 255); glLineWidth(10); diff --git a/tests/Classes/NodeTest/NodeTest.cpp b/tests/Classes/NodeTest/NodeTest.cpp index f3e32b6a60..a3e10a4753 100644 --- a/tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/Classes/NodeTest/NodeTest.cpp @@ -974,7 +974,7 @@ public: sprite->setShaderProgram(shader); return sprite; } - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; void onDraw(); protected: @@ -982,7 +982,7 @@ protected: }; -void MySprite::draw() +void MySprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(MySprite::onDraw, this); diff --git a/tests/Classes/RenderTextureTest/RenderTextureTest.cpp b/tests/Classes/RenderTextureTest/RenderTextureTest.cpp index aa0317bd03..4107b99ff1 100644 --- a/tests/Classes/RenderTextureTest/RenderTextureTest.cpp +++ b/tests/Classes/RenderTextureTest/RenderTextureTest.cpp @@ -462,7 +462,7 @@ RenderTextureTestDepthStencil::~RenderTextureTestDepthStencil() CC_SAFE_RELEASE(_spriteDS); } -void RenderTextureTestDepthStencil::draw() +void RenderTextureTestDepthStencil::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmds[0].init(_globalZOrder); _renderCmds[0].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onBeforeClear, this); @@ -630,13 +630,13 @@ SpriteRenderTextureBug::SimpleSprite* SpriteRenderTextureBug::SimpleSprite::crea return sprite; } -void SpriteRenderTextureBug::SimpleSprite::draw() +void SpriteRenderTextureBug::SimpleSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(SpriteRenderTextureBug::SimpleSprite::onBeforeDraw, this); Director::getInstance()->getRenderer()->addCommand(&_customCommand); - Sprite::draw(); + Sprite::draw(renderer, transform, transformDirty); } diff --git a/tests/Classes/RenderTextureTest/RenderTextureTest.h b/tests/Classes/RenderTextureTest/RenderTextureTest.h index 8b7596a825..88aead2bfc 100644 --- a/tests/Classes/RenderTextureTest/RenderTextureTest.h +++ b/tests/Classes/RenderTextureTest/RenderTextureTest.h @@ -86,7 +86,7 @@ public: virtual ~RenderTextureTestDepthStencil(); virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw() override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; private: CustomCommand _renderCmds[4]; void onBeforeClear(); @@ -125,7 +125,7 @@ public: public: static SimpleSprite* create(const char* filename, const Rect &rect); SimpleSprite(); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty); protected: void onBeforeDraw(); diff --git a/tests/Classes/ShaderTest/ShaderTest.cpp b/tests/Classes/ShaderTest/ShaderTest.cpp index 0377617ae5..6818dc9869 100644 --- a/tests/Classes/ShaderTest/ShaderTest.cpp +++ b/tests/Classes/ShaderTest/ShaderTest.cpp @@ -191,7 +191,7 @@ void ShaderNode::setPosition(const Point &newPosition) _center = Vertex2F(position.x * CC_CONTENT_SCALE_FACTOR(), position.y * CC_CONTENT_SCALE_FACTOR()); } -void ShaderNode::draw() +void ShaderNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ShaderNode::onDraw, this); @@ -433,7 +433,7 @@ public: ~SpriteBlur(); void setBlurSize(float f); bool initWithTexture(Texture2D* texture, const Rect& rect); - void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; void initProgram(); static SpriteBlur* create(const char *pszFileName); @@ -525,7 +525,7 @@ void SpriteBlur::initProgram() CHECK_GL_ERROR_DEBUG(); } -void SpriteBlur::draw() +void SpriteBlur::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(SpriteBlur::onDraw, this); diff --git a/tests/Classes/ShaderTest/ShaderTest.h b/tests/Classes/ShaderTest/ShaderTest.h index 9c28c6769b..677efd4a59 100644 --- a/tests/Classes/ShaderTest/ShaderTest.h +++ b/tests/Classes/ShaderTest/ShaderTest.h @@ -121,7 +121,7 @@ public: virtual void update(float dt); virtual void setPosition(const Point &newPosition); - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; static ShaderNode* shaderNodeWithVertex(const char *vert, const char *frag); diff --git a/tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/Classes/ShaderTest/ShaderTest2.cpp index 755f2ce57c..e605ef78e9 100644 --- a/tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/Classes/ShaderTest/ShaderTest2.cpp @@ -112,7 +112,7 @@ public: virtual void initShader(); void setBackgroundNotification(); - void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; void listenBackToForeground(Ref *obj); protected: @@ -176,7 +176,7 @@ void ShaderSprite::initShader() CHECK_GL_ERROR_DEBUG(); } -void ShaderSprite::draw() +void ShaderSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCommand.init(_globalZOrder); _renderCommand.func = CC_CALLBACK_0(ShaderSprite::onDraw, this); diff --git a/tests/Classes/Texture2dTest/Texture2dTest.cpp b/tests/Classes/Texture2dTest/Texture2dTest.cpp index 1c554bd573..a5cd917408 100644 --- a/tests/Classes/Texture2dTest/Texture2dTest.cpp +++ b/tests/Classes/Texture2dTest/Texture2dTest.cpp @@ -1791,9 +1791,9 @@ std::string TextureDrawAtPoint::subtitle() const return "draws 2 textures using drawAtPoint"; } -void TextureDrawAtPoint::draw() +void TextureDrawAtPoint::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - TextureDemo::draw(); + TextureDemo::draw(renderer, transform, transformDirty); _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TextureDrawAtPoint::onDraw, this); @@ -1832,9 +1832,9 @@ TextureDrawInRect::~TextureDrawInRect() _Tex2F->release(); } -void TextureDrawInRect::draw() +void TextureDrawInRect::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { - TextureDemo::draw(); + TextureDemo::draw(renderer, transform, transformDirty); _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TextureDrawInRect::onDraw, this); diff --git a/tests/Classes/Texture2dTest/Texture2dTest.h b/tests/Classes/Texture2dTest/Texture2dTest.h index a44bcebe9e..672da26333 100644 --- a/tests/Classes/Texture2dTest/Texture2dTest.h +++ b/tests/Classes/Texture2dTest/Texture2dTest.h @@ -466,7 +466,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void onEnter() override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: CustomCommand _renderCmd; void onDraw(); @@ -482,7 +482,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void onEnter() override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: CustomCommand _renderCmd; void onDraw(); diff --git a/tests/Classes/TileMapTest/TileMapTest.cpp b/tests/Classes/TileMapTest/TileMapTest.cpp index bec7bc79fe..b44fefa4fa 100644 --- a/tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/Classes/TileMapTest/TileMapTest.cpp @@ -755,7 +755,7 @@ TMXOrthoObjectsTest::TMXOrthoObjectsTest() CCLOG("%s", objectsVal.getDescription().c_str()); } -void TMXOrthoObjectsTest::draw() +void TMXOrthoObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TMXOrthoObjectsTest::onDraw, this); @@ -829,7 +829,7 @@ TMXIsoObjectsTest::TMXIsoObjectsTest() CCLOG("%s", objectsVal.getDescription().c_str()); } -void TMXIsoObjectsTest::draw() +void TMXIsoObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TMXIsoObjectsTest::onDraw, this); @@ -1513,7 +1513,7 @@ TMXGIDObjectsTest::TMXGIDObjectsTest() } -void TMXGIDObjectsTest::draw() +void TMXGIDObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TMXGIDObjectsTest::onDraw, this); diff --git a/tests/Classes/TileMapTest/TileMapTest.h b/tests/Classes/TileMapTest/TileMapTest.h index 191041c7eb..85ad393a56 100644 --- a/tests/Classes/TileMapTest/TileMapTest.h +++ b/tests/Classes/TileMapTest/TileMapTest.h @@ -134,7 +134,7 @@ public: TMXOrthoObjectsTest(void); virtual std::string title() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string subtitle() const override; protected: CustomCommand _renderCmd; @@ -147,7 +147,7 @@ public: TMXIsoObjectsTest(void); virtual std::string title() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; virtual std::string subtitle() const override; protected: CustomCommand _renderCmd; @@ -292,7 +292,7 @@ public: TMXGIDObjectsTest(); virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; protected: CustomCommand _renderCmd; From bbc1c385c2fba5eed9742848c20e728f86fbe04b Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 15:08:18 +0800 Subject: [PATCH 19/69] issue #4129: EventTouch::getTouches return const reference. --- cocos/2d/CCEventTouch.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCEventTouch.h b/cocos/2d/CCEventTouch.h index 508241ca85..05d4eb8f2c 100644 --- a/cocos/2d/CCEventTouch.h +++ b/cocos/2d/CCEventTouch.h @@ -48,8 +48,8 @@ public: EventTouch(); - EventCode getEventCode() { return _eventCode; }; - std::vector getTouches() { return _touches; }; + inline EventCode getEventCode() const { return _eventCode; }; + inline const std::vector& getTouches() const { return _touches; }; #if TOUCH_PERF_DEBUG void setEventCode(EventCode eventCode) { _eventCode = eventCode; }; From 7774bb4c6c2aa733ed984eb9e952d1cb4085bf2e Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 15:09:53 +0800 Subject: [PATCH 20/69] closed #4129: Event listeners in engine shouldn't be removed by method removeAllEventListeners(). --- cocos/2d/CCEventDispatcher.cpp | 23 ++++++++++++++++++++--- cocos/2d/CCEventDispatcher.h | 2 ++ 2 files changed, 22 insertions(+), 3 deletions(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index 54b3617027..13b4b35224 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -33,6 +33,7 @@ #include "CCNode.h" #include "CCDirector.h" +#include "CCEventType.h" #include @@ -184,10 +185,18 @@ EventDispatcher::EventDispatcher() , _nodePriorityIndex(0) { _toAddedListeners.reserve(50); + + // fixed #4129: Mark the following listener IDs for internal use. + // Therefore, internal listeners would not be cleaned when removeAllEventListeners is invoked. + _internalCustomListenerIDs.insert(EVENT_COME_TO_FOREGROUND); + _internalCustomListenerIDs.insert(EVENT_COME_TO_BACKGROUND); } EventDispatcher::~EventDispatcher() { + // Clear internal custom listener IDs from set, + // so removeAllEventListeners would clean internal custom listeners. + _internalCustomListenerIDs.clear(); removeAllEventListeners(); } @@ -1131,11 +1140,19 @@ void EventDispatcher::removeCustomEventListeners(const std::string& customEventN void EventDispatcher::removeAllEventListeners() { + bool cleanMap = true; std::vector types(_listenerMap.size()); - + for (const auto& e : _listenerMap) { - types.push_back(e.first); + if (_internalCustomListenerIDs.find(e.first) != _internalCustomListenerIDs.end()) + { + cleanMap = false; + } + else + { + types.push_back(e.first); + } } for (const auto& type : types) @@ -1143,7 +1160,7 @@ void EventDispatcher::removeAllEventListeners() removeEventListenersForListenerID(type); } - if (!_inDispatch) + if (!_inDispatch && cleanMap) { _listenerMap.clear(); } diff --git a/cocos/2d/CCEventDispatcher.h b/cocos/2d/CCEventDispatcher.h index 381508bbc2..7a6044828d 100644 --- a/cocos/2d/CCEventDispatcher.h +++ b/cocos/2d/CCEventDispatcher.h @@ -247,6 +247,8 @@ protected: bool _isEnabled; int _nodePriorityIndex; + + std::set _internalCustomListenerIDs; }; From a934d29c57f14a26be746f0726b21492bf527f62 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Fri, 28 Feb 2014 15:31:25 +0800 Subject: [PATCH 21/69] issue #4150: Correct body position with the node has a parent. Add set/getPosition/Rotation method. --- cocos/2d/CCNode.cpp | 29 ++++++++++++- cocos/2d/CCNode.h | 2 + cocos/physics/CCPhysicsBody.cpp | 74 +++++++++++++++++++++++---------- cocos/physics/CCPhysicsBody.h | 11 +++++ 4 files changed, 93 insertions(+), 23 deletions(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 49472cf822..69a3454cac 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -419,7 +419,9 @@ void Node::setPosition(const Point& position) #if CC_USE_PHYSICS if (_physicsBody) { - _physicsBody->setPosition(position); + Node* parent = getParent(); + Point pos = parent != nullptr ? parent->convertToWorldSpace(getPosition()) : getPosition(); + _physicsBody->setPosition(pos); } #endif } @@ -534,6 +536,14 @@ const Point& Node::getAnchorPoint() const void Node::setAnchorPoint(const Point& point) { +#if CC_USE_PHYSICS + if (_physicsBody != nullptr && point.equals(Point::ANCHOR_MIDDLE)) + { + CCLOG("Node warning: This node has a physics body, the anchor must be in the middle, you cann't change this to other value."); + return; + } +#endif + if( ! point.equals(_anchorPoint)) { _anchorPoint = point; @@ -719,6 +729,11 @@ void Node::addChild(Node *child, int zOrder, int tag) this->insertChild(child, zOrder); #if CC_USE_PHYSICS + if (child->getPhysicsBody() != nullptr) + { + child->getPhysicsBody()->setPosition(this->convertToWorldSpace(child->getPosition())); + } + for (Node* node = this->getParent(); node != nullptr; node = node->getParent()) { if (dynamic_cast(node) != nullptr) @@ -1511,6 +1526,14 @@ void Node::setPhysicsBody(PhysicsBody* body) { body->_node = this; body->retain(); + + // physics rotation based on body position, but node rotation based on node anthor point + // it cann't support both of them, so I clear the anthor point to default. + if (!getAnchorPoint().equals(Point::ANCHOR_MIDDLE)) + { + CCLOG("Node warning: setPhysicsBody sets anchor point to Point::ANCHOR_MIDDLE."); + setAnchorPoint(Point::ANCHOR_MIDDLE); + } } if (_physicsBody != nullptr) @@ -1529,7 +1552,9 @@ void Node::setPhysicsBody(PhysicsBody* body) _physicsBody = body; if (body != nullptr) { - _physicsBody->setPosition(getPosition()); + Node* parent = getParent(); + Point pos = parent != nullptr ? parent->convertToWorldSpace(getPosition()) : getPosition(); + _physicsBody->setPosition(pos); _physicsBody->setRotation(getRotation()); } } diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 1d00884cda..bd88ec0b2f 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -449,6 +449,7 @@ public: * The anchorPoint is normalized, like a percentage. (0,0) means the bottom-left corner and (1,1) means the top-right corner. * But you can use values higher than (1,1) and lower than (0,0) too. * The default anchorPoint is (0.5,0.5), so it starts in the center of the node. + * @note If node has a physics body, the anchor must be in the middle, you cann't change this to other value. * * @param anchorPoint The anchor point of node. */ @@ -1432,6 +1433,7 @@ public: #if CC_USE_PHYSICS /** * set the PhysicsBody that let the sprite effect with physics + * @note This method will set anchor point to Point::ANCHOR_MIDDLE if body not null, and you cann't change anchor point if node has a physics body. */ void setPhysicsBody(PhysicsBody* body); diff --git a/cocos/physics/CCPhysicsBody.cpp b/cocos/physics/CCPhysicsBody.cpp index 46b2ab4637..85a2436292 100644 --- a/cocos/physics/CCPhysicsBody.cpp +++ b/cocos/physics/CCPhysicsBody.cpp @@ -75,6 +75,7 @@ PhysicsBody::PhysicsBody() , _group(0) , _positionResetTag(false) , _rotationResetTag(false) +, _rotationOffset(0) { } @@ -347,7 +348,7 @@ void PhysicsBody::setPosition(Point position) { if (!_positionResetTag) { - cpBodySetPos(_info->getBody(), PhysicsHelper::point2cpv(position)); + cpBodySetPos(_info->getBody(), PhysicsHelper::point2cpv(position + _positionOffset)); } _positionResetTag = false; } @@ -356,7 +357,7 @@ void PhysicsBody::setRotation(float rotation) { if (!_rotationResetTag) { - cpBodySetAngle(_info->getBody(), -PhysicsHelper::float2cpfloat(rotation * M_PI / 180.0f)); + cpBodySetAngle(_info->getBody(), -PhysicsHelper::float2cpfloat((rotation + _rotationOffset) * (M_PI / 180.0f))); } _rotationResetTag = false; @@ -365,12 +366,12 @@ void PhysicsBody::setRotation(float rotation) Point PhysicsBody::getPosition() const { cpVect vec = cpBodyGetPos(_info->getBody()); - return PhysicsHelper::cpv2point(vec); + return PhysicsHelper::cpv2point(vec) - _positionOffset; } float PhysicsBody::getRotation() const { - return -PhysicsHelper::cpfloat2float(cpBodyGetAngle(_info->getBody()) / M_PI * 180.0f); + return -PhysicsHelper::cpfloat2float(cpBodyGetAngle(_info->getBody()) * (180.0f / M_PI)) - _rotationOffset; } PhysicsShape* PhysicsBody::addShape(PhysicsShape* shape, bool addMassAndMoment/* = true*/) @@ -767,27 +768,18 @@ void PhysicsBody::setResting(bool rest) const void PhysicsBody::update(float delta) { - if (_node != nullptr && _dynamic && !isResting()) + if (_node != nullptr) { - cpVect pos = cpBodyGetPos(_info->getBody()); - cpVect prePos = _info->getPosition(); - cpVect rot = cpBodyGetRot(_info->getBody()); - cpVect preRot = _info->getRotation(); + Node* parent = _node->getParent(); - // only reset the node position when body position/rotation changed. - if (std::abs(pos.x - prePos.x) >= 0.3f || std::abs(pos.y - prePos.y) >= 0.3f - || std::abs(rot.x - preRot.x) >= 0.01f || std::abs(rot.y - preRot.y) >= 0.01f) - { - _positionResetTag = true; - _rotationResetTag = true; - _node->setPosition(getPosition()); - _info->setPosition(pos); - _node->setRotation(getRotation()); - _info->setRotation(rot); - } + Point position = parent != nullptr ? parent->convertToNodeSpace(getPosition()) : getPosition(); + _positionResetTag = true; + _rotationResetTag = true; + _node->setPosition(position); + _node->setRotation(getRotation()); // damping compute - if (_isDamping) + if (_isDamping && _dynamic && !isResting()) { _info->getBody()->v.x *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f); _info->getBody()->v.y *= cpfclamp(1.0f - delta * _linearDamping, 0.0f, 1.0f); @@ -834,6 +826,46 @@ void PhysicsBody::setGroup(int group) } } +void PhysicsBody::setPositionOffset(const Point& position) +{ + if (!_positionOffset.equals(position)) + { + Point pos = getPosition(); + + _positionOffset = position; + + if (_node!= nullptr) + { + setPosition(pos); + } + } +} + +Point PhysicsBody::getPositionOffset() +{ + return _positionOffset; +} + +void PhysicsBody::setRotationOffset(float rotation) +{ + if (std::abs(_rotationOffset - rotation) > 0.5f) + { + float rot = getRotation(); + + _rotationOffset = rotation; + + if (_node != nullptr) + { + setRotation(rot); + } + } +} + +float PhysicsBody::getRotationOffset() +{ + return _rotationOffset; +} + Point PhysicsBody::world2Local(const Point& point) { return PhysicsHelper::cpv2point(cpBodyWorld2Local(_info->getBody(), PhysicsHelper::point2cpv(point))); diff --git a/cocos/physics/CCPhysicsBody.h b/cocos/physics/CCPhysicsBody.h index ea7a80aba5..4f4f9a2425 100644 --- a/cocos/physics/CCPhysicsBody.h +++ b/cocos/physics/CCPhysicsBody.h @@ -192,6 +192,15 @@ public: /** get the body rotation. */ float getRotation() const; + /** set body position offset, it's the position witch relative to node */ + void setPositionOffset(const Point& position); + /** get body position offset. */ + Point getPositionOffset(); + /** set body rotation offset, it's the rotation witch relative to node */ + void setRotationOffset(float rotation); + /** set the body rotation offset */ + float getRotationOffset(); + /** * @brief test the body is dynamic or not. * a dynamic body will effect with gravity. @@ -332,6 +341,8 @@ protected: bool _positionResetTag; /// To avoid reset the body position when body invoke Node::setPosition(). bool _rotationResetTag; /// To avoid reset the body rotation when body invoke Node::setRotation(). + Point _positionOffset; + float _rotationOffset; friend class PhysicsWorld; friend class PhysicsShape; From b2cebebbaf1797913291031a11cd20e1ed817906 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 15:40:03 +0800 Subject: [PATCH 22/69] issue #4129: Remove unused references in Xcode project. --- build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id index fd3bd1e43b..0535c3667c 100644 --- a/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id +++ b/build/cocos2d_libs.xcodeproj/project.pbxproj.REMOVED.git-id @@ -1 +1 @@ -3e5af93e674100c3fcff441051ba5d9d6f3be7bb \ No newline at end of file +8fad051dc33d390c01df304fee2a78e22785136f \ No newline at end of file From d33017f27acb9fb47e143f6ba1f3d3fdcb3f8628 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 15:40:45 +0800 Subject: [PATCH 23/69] issue #4129: Adds default argument(nullptr) for dispatchCustomEvent. --- cocos/2d/CCEventDispatcher.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCEventDispatcher.h b/cocos/2d/CCEventDispatcher.h index 7a6044828d..9e9077159d 100644 --- a/cocos/2d/CCEventDispatcher.h +++ b/cocos/2d/CCEventDispatcher.h @@ -108,7 +108,7 @@ public: void dispatchEvent(Event* event); /** Dispatches a Custom Event with a event name an optional user data */ - void dispatchCustomEvent(const std::string &eventName, void *optionalUserData); + void dispatchCustomEvent(const std::string &eventName, void *optionalUserData = nullptr); /** Constructor of EventDispatcher */ EventDispatcher(); From 7dd75ea2cb510a02e9e1ab0f86e65c3fd65ff114 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 15:46:48 +0800 Subject: [PATCH 24/69] issue #4129: Adds test case for issue 4119. --- .../NewEventDispatcherTest.cpp | 64 +++++++++++++++++++ .../NewEventDispatcherTest.h | 16 +++++ 2 files changed, 80 insertions(+) diff --git a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index 8b3d0a7cd2..c9f1f403d3 100644 --- a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -24,6 +24,7 @@ std::function createFunctions[] = CL(DirectorEventTest), CL(GlobalZTouchTest), CL(StopPropagationTest), + CL(Issue4129), }; unsigned int TEST_CASE_COUNT = sizeof(createFunctions) / sizeof(createFunctions[0]); @@ -1088,3 +1089,66 @@ std::string StopPropagationTest::subtitle() const { return "Shouldn't crash and only blue block could be clicked"; } + +Issue4129::Issue4129() +: _bugFixed(false) +{ + _customlistener = _eventDispatcher->addCustomEventListener(EVENT_COME_TO_BACKGROUND, [this](EventCustom* event){ + + auto label = LabelTTF::create("Yeah, this issue was fixed.", "", 20); + label->setAnchorPoint(Point(0, 0.5f)); + label->setPosition(Point(VisibleRect::left())); + this->addChild(label); + + // After test, remove it. + _eventDispatcher->removeEventListener(_customlistener); + + _bugFixed = true; + }); + + auto removeAllTouchItem = MenuItemFont::create("Remove All Listeners", [this](Ref* sender){ + auto senderItem = static_cast(sender); + senderItem->setString("Only 'Reset' item could be clicked"); + + _eventDispatcher->removeAllEventListeners(); + + auto nextItem = MenuItemFont::create("Reset", [=](Ref* sender){ + CCASSERT(_bugFixed, "This issue was not fixed!"); + this->restartCallback(nullptr); + }); + + nextItem->setFontSizeObj(16); + nextItem->setPosition(VisibleRect::right() + Point(-100, -30)); + + auto menu2 = Menu::create(nextItem, NULL); + menu2->setPosition(Point(0, 0)); + menu2->setAnchorPoint(Point(0, 0)); + this->addChild(menu2); + + // Simulate to dispatch 'come to background' event + _eventDispatcher->dispatchCustomEvent(EVENT_COME_TO_BACKGROUND); + }); + + removeAllTouchItem->setFontSizeObj(16); + removeAllTouchItem->setPosition(VisibleRect::right() + Point(-100, 0)); + + auto menu = Menu::create(removeAllTouchItem, nullptr); + menu->setPosition(Point(0, 0)); + menu->setAnchorPoint(Point(0, 0)); + addChild(menu); +} + +Issue4129::~Issue4129() +{ + _eventDispatcher->removeEventListener(_customlistener); +} + +std::string Issue4129::title() const +{ + return "Issue 4129: Remove All Listeners"; +} + +std::string Issue4129::subtitle() const +{ + return "Should see 'Yeah, this issue was fixed.'"; +} diff --git a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h index e24f8488f3..90b48bf22d 100644 --- a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h +++ b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h @@ -165,4 +165,20 @@ protected: bool isPointInTopHalfAreaOfScreen(Point pt); }; +class Issue4129 : public EventDispatcherTestDemo +{ +public: + CREATE_FUNC(Issue4129); + Issue4129(); + virtual ~Issue4129(); + + virtual std::string title() const override; + virtual std::string subtitle() const override; + +private: + EventListenerCustom* _customlistener; + bool _bugFixed; +}; + + #endif /* defined(__samples__NewEventDispatcherTest__) */ From 015180bf625e36b680d4c1dab34f21f8f83904f2 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Fri, 28 Feb 2014 15:47:49 +0800 Subject: [PATCH 25/69] issue #4150: Add physics position/rotation test --- cocos/physics/CCPhysicsBody.cpp | 14 +----- tests/Classes/PhysicsTest/PhysicsTest.cpp | 59 +++++++++++++++++++++++ tests/Classes/PhysicsTest/PhysicsTest.h | 9 ++++ 3 files changed, 70 insertions(+), 12 deletions(-) diff --git a/cocos/physics/CCPhysicsBody.cpp b/cocos/physics/CCPhysicsBody.cpp index 85a2436292..2f075d311e 100644 --- a/cocos/physics/CCPhysicsBody.cpp +++ b/cocos/physics/CCPhysicsBody.cpp @@ -831,13 +831,8 @@ void PhysicsBody::setPositionOffset(const Point& position) if (!_positionOffset.equals(position)) { Point pos = getPosition(); - _positionOffset = position; - - if (_node!= nullptr) - { - setPosition(pos); - } + setPosition(pos); } } @@ -851,13 +846,8 @@ void PhysicsBody::setRotationOffset(float rotation) if (std::abs(_rotationOffset - rotation) > 0.5f) { float rot = getRotation(); - _rotationOffset = rotation; - - if (_node != nullptr) - { - setRotation(rot); - } + setRotation(rot); } } diff --git a/tests/Classes/PhysicsTest/PhysicsTest.cpp b/tests/Classes/PhysicsTest/PhysicsTest.cpp index dff1bbc35e..6c5347453d 100644 --- a/tests/Classes/PhysicsTest/PhysicsTest.cpp +++ b/tests/Classes/PhysicsTest/PhysicsTest.cpp @@ -18,6 +18,7 @@ namespace CL(PhysicsDemoSlice), CL(PhysicsDemoBug3988), CL(PhysicsContactTest), + CL(PhysicsPositionRotationTest), #else CL(PhysicsDemoDisabled), #endif @@ -1545,4 +1546,62 @@ std::string PhysicsContactTest::subtitle() const return "should not crash"; } +void PhysicsPositionRotationTest::onEnter() +{ + PhysicsDemo::onEnter(); + _scene->toggleDebug(); + _scene->getPhysicsWorld()->setGravity(Point::ZERO); + + auto touchListener = EventListenerTouchOneByOne::create(); + touchListener->onTouchBegan = CC_CALLBACK_2(PhysicsDemo::onTouchBegan, this); + touchListener->onTouchMoved = CC_CALLBACK_2(PhysicsDemo::onTouchMoved, this); + touchListener->onTouchEnded = CC_CALLBACK_2(PhysicsDemo::onTouchEnded, this); + _eventDispatcher->addEventListenerWithSceneGraphPriority(touchListener, this); + + auto wall = Node::create(); + wall->setPhysicsBody(PhysicsBody::createEdgeBox(VisibleRect::getVisibleRect().size)); + wall->setPosition(VisibleRect::center()); + addChild(wall); + + // anchor test + auto anchorNode = Sprite::create("Images/YellowSquare.png"); + anchorNode->setAnchorPoint(Point(0.1, 0.9)); + anchorNode->setPosition(100, 100); + anchorNode->setScale(0.25); + anchorNode->setPhysicsBody(PhysicsBody::createBox(anchorNode->getContentSize()*anchorNode->getScale())); + anchorNode->getPhysicsBody()->setTag(DRAG_BODYS_TAG); + addChild(anchorNode); + + //parent test + auto parent = Sprite::create("Images/YellowSquare.png"); + parent->setPosition(200, 100); + parent->setScale(0.25); + parent->setPhysicsBody(PhysicsBody::createBox(parent->getContentSize()*anchorNode->getScale())); + parent->getPhysicsBody()->setTag(DRAG_BODYS_TAG); + addChild(parent); + + auto leftBall = Sprite::create("Images/ball.png"); + leftBall->setPosition(-30, 0); + leftBall->cocos2d::Node::setScale(2); + leftBall->setPhysicsBody(PhysicsBody::createCircle(leftBall->getContentSize().width/4)); + leftBall->getPhysicsBody()->setTag(DRAG_BODYS_TAG); + parent->addChild(leftBall); + + // offset position rotation test + auto offsetPosNode = Sprite::create("Images/YellowSquare.png"); + offsetPosNode->setPosition(100, 200); + offsetPosNode->setPhysicsBody(PhysicsBody::createBox(offsetPosNode->getContentSize()/2)); + offsetPosNode->getPhysicsBody()->setPositionOffset(-Point(offsetPosNode->getContentSize()/2)); + offsetPosNode->getPhysicsBody()->setRotationOffset(45); + offsetPosNode->getPhysicsBody()->setTag(DRAG_BODYS_TAG); + addChild(offsetPosNode); + + return; +} + +std::string PhysicsPositionRotationTest::title() const +{ + return "Position/Rotation Test"; +} + #endif // ifndef CC_USE_PHYSICS diff --git a/tests/Classes/PhysicsTest/PhysicsTest.h b/tests/Classes/PhysicsTest/PhysicsTest.h index 585b525cad..a990b3edfd 100644 --- a/tests/Classes/PhysicsTest/PhysicsTest.h +++ b/tests/Classes/PhysicsTest/PhysicsTest.h @@ -216,6 +216,15 @@ private: int _blueTriangleNum; }; +class PhysicsPositionRotationTest : public PhysicsDemo +{ +public: + CREATE_FUNC(PhysicsPositionRotationTest); + + void onEnter() override; + virtual std::string title() const override; +}; + #endif #endif From 5244cb93ed140c2d1806cca071dda6a85b298e3c Mon Sep 17 00:00:00 2001 From: boyu0 Date: Fri, 28 Feb 2014 15:50:38 +0800 Subject: [PATCH 26/69] closed #4150: Delete PhysicsBodyInfo::set/getPosition/Rotation method. --- cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h | 6 ------ 1 file changed, 6 deletions(-) diff --git a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h index ac6ee4fe3b..3cbade4a7b 100644 --- a/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h +++ b/cocos/physics/chipmunk/CCPhysicsBodyInfo_chipmunk.h @@ -39,10 +39,6 @@ class PhysicsBodyInfo public: inline cpBody* getBody() const { return _body; } inline void setBody(cpBody* body) { _body = body; } - inline cpVect getPosition() const { return _position; } - inline void setPosition(cpVect& vect) { _position = vect; } - inline cpVect getRotation() const { return _rotation; } - inline void setRotation(cpVect& vect) { _rotation = vect; } private: PhysicsBodyInfo(); @@ -50,8 +46,6 @@ private: private: cpBody* _body; - cpVect _position; - cpVect _rotation; friend class PhysicsBody; }; From 40d29824c539791e6c89fcd047f62815fce3a586 Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 16:36:09 +0800 Subject: [PATCH 27/69] Update AUTHORS [ci skip] --- AUTHORS | 3 +++ 1 file changed, 3 insertions(+) diff --git a/AUTHORS b/AUTHORS index 4859b3a398..d2f6ac3941 100644 --- a/AUTHORS +++ b/AUTHORS @@ -773,6 +773,9 @@ Developers: odedsh Fixed a bug that loading custom fonts from ttf file fails on windows. + + Wilhansen + Fixed a bug that spine::Skeleton would not be updated after re-adding to scene. Retired Core Developers: WenSheng Yang From 2995f91b595ab94520a95e4ced12967f1bbc443b Mon Sep 17 00:00:00 2001 From: James Chen Date: Fri, 28 Feb 2014 16:38:05 +0800 Subject: [PATCH 28/69] Update CHANGELOG [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 84b406aa5d..ebbd7781f7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -16,6 +16,7 @@ cocos2d-x-3.0rc0 Feb.?? 2014 [NEW] Language: Added Dutch support. [NEW] Sprite: Added auto-culling support + [FIX] spine::Skeleton would not be updated after being re-added to scene. [FIX] Loading custom fonts from ttf file fails on windows. [FIX] FadeIn and FadeOut behaviours is incorrect if it doesn't start from an edge value( 0 or 255). [FIX] Renderer: Expand textureID bit from 18bits to 32bits. Resolves probably crash on Linux / Android. From 7d5ac249fbb43af70e796d480d98d4130dced9c5 Mon Sep 17 00:00:00 2001 From: zhangbin Date: Fri, 28 Feb 2014 17:29:12 +0800 Subject: [PATCH 29/69] Modify the depend project path for project "TestCpp". --- tests/proj.android/project.properties | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/proj.android/project.properties b/tests/proj.android/project.properties index 16f145cfc9..94391cd93b 100644 --- a/tests/proj.android/project.properties +++ b/tests/proj.android/project.properties @@ -10,4 +10,4 @@ # Project target. target=android-10 -android.library.reference.1=../../../cocos/2d/platform/android/java +android.library.reference.1=../../cocos/2d/platform/android/java From 46c93f07ad448ec695b6ca71aed8050045020bcb Mon Sep 17 00:00:00 2001 From: andyque Date: Fri, 28 Feb 2014 17:32:54 +0800 Subject: [PATCH 30/69] fixed #4103. fix crash when websocket close --- cocos/network/WebSocket.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/cocos/network/WebSocket.cpp b/cocos/network/WebSocket.cpp index 1da79ac1e1..16a001c6b2 100644 --- a/cocos/network/WebSocket.cpp +++ b/cocos/network/WebSocket.cpp @@ -699,6 +699,8 @@ void WebSocket::onUIThreadReceiveMessage(WsMessage* msg) break; case WS_MSG_TO_UITHREAD_CLOSE: { + //Waiting for the subThread safety exit + _wsHelper->joinSubThread(); _delegate->onClose(this); } break; From 0837b73dda351ca55daabcc762647af5c37d0bce Mon Sep 17 00:00:00 2001 From: Dhilan007 Date: Fri, 28 Feb 2014 17:34:24 +0800 Subject: [PATCH 31/69] fixed incorrect effect of Gaussian Blur. --- tests/Classes/ShaderTest/ShaderTest.cpp | 77 ++++++++++++++++++------- 1 file changed, 56 insertions(+), 21 deletions(-) diff --git a/tests/Classes/ShaderTest/ShaderTest.cpp b/tests/Classes/ShaderTest/ShaderTest.cpp index 0377617ae5..07d5e086fa 100644 --- a/tests/Classes/ShaderTest/ShaderTest.cpp +++ b/tests/Classes/ShaderTest/ShaderTest.cpp @@ -438,14 +438,21 @@ public: static SpriteBlur* create(const char *pszFileName); - Point blur_; - GLfloat sub_[4]; - - GLuint blurLocation; - GLuint subLocation; protected: void onDraw(); private: + int _blurRadius; + Point _pixelSize; + + int _samplingRadius; + //gaussian = cons * exp( (dx*dx + dy*dy) * scale); + float _scale; + float _cons; + float _weightSum; + + GLuint pixelSizeLocation; + GLuint coefficientLocation; + CustomCommand _customCommand; }; @@ -470,6 +477,7 @@ SpriteBlur* SpriteBlur::create(const char *pszFileName) bool SpriteBlur::initWithTexture(Texture2D* texture, const Rect& rect) { + _blurRadius = 0; if( Sprite::initWithTexture(texture, rect) ) { #if CC_ENABLE_CACHE_TEXTURE_DATA @@ -483,11 +491,10 @@ bool SpriteBlur::initWithTexture(Texture2D* texture, const Rect& rect) auto s = getTexture()->getContentSizeInPixels(); - blur_ = Point(1/s.width, 1/s.height); - sub_[0] = sub_[1] = sub_[2] = sub_[3] = 0; - + _pixelSize = Point(1/s.width, 1/s.height); + _samplingRadius = 0; this->initProgram(); - + return true; } @@ -497,7 +504,7 @@ bool SpriteBlur::initWithTexture(Texture2D* texture, const Rect& rect) void SpriteBlur::initProgram() { GLchar * fragSource = (GLchar*) String::createWithContentsOfFile( - FileUtils::getInstance()->fullPathForFilename("Shaders/example_Blur.fsh").c_str())->getCString(); + FileUtils::getInstance()->fullPathForFilename("Shaders/example_Blur.fsh").c_str())->getCString(); auto pProgram = new GLProgram(); pProgram->initWithVertexShaderByteArray(ccPositionTextureColor_vert, fragSource); setShaderProgram(pProgram); @@ -519,9 +526,9 @@ void SpriteBlur::initProgram() CHECK_GL_ERROR_DEBUG(); - subLocation = glGetUniformLocation( getShaderProgram()->getProgram(), "substract"); - blurLocation = glGetUniformLocation( getShaderProgram()->getProgram(), "blurSize"); - + pixelSizeLocation = glGetUniformLocation( getShaderProgram()->getProgram(), "onePixelSize"); + coefficientLocation = glGetUniformLocation( getShaderProgram()->getProgram(), "gaussianCoefficient"); + CHECK_GL_ERROR_DEBUG(); } @@ -540,8 +547,8 @@ void SpriteBlur::onDraw() getShaderProgram()->use(); getShaderProgram()->setUniformsForBuiltins(); - getShaderProgram()->setUniformLocationWith2f(blurLocation, blur_.x, blur_.y); - getShaderProgram()->setUniformLocationWith4fv(subLocation, sub_, 1); + getShaderProgram()->setUniformLocationWith2f(pixelSizeLocation, _pixelSize.x, _pixelSize.y); + getShaderProgram()->setUniformLocationWith4f(coefficientLocation, _samplingRadius, _scale,_cons,_weightSum); GL::bindTexture2D( getTexture()->getName()); @@ -571,10 +578,37 @@ void SpriteBlur::onDraw() void SpriteBlur::setBlurSize(float f) { - auto s = getTexture()->getContentSizeInPixels(); + if(_blurRadius == (int)f) + return; + _blurRadius = (int)f; - blur_ = Point(1/s.width, 1/s.height); - blur_ = blur_ * f; + _samplingRadius = _blurRadius; + if (_samplingRadius > 10) + { + _samplingRadius = 10; + } + if (_blurRadius > 0) + { + float sigma = _blurRadius / 2.0f; + _scale = -0.5f / (sigma * sigma); + _cons = -1.0f * _scale / 3.141592f; + _weightSum = -_cons; + + float weight; + int squareX; + for(int dx = 0; dx <= _samplingRadius; ++dx) + { + squareX = dx * dx; + weight = _cons * exp(squareX * _scale); + _weightSum += 2.0 * weight; + for (int dy = 1; dy <= _samplingRadius; ++dy) + { + weight = _cons * exp((squareX + dy * dy) * _scale); + _weightSum += 4.0 * weight; + } + } + } + log("_blurRadius:%d",_blurRadius); } // ShaderBlur @@ -597,16 +631,17 @@ std::string ShaderBlur::subtitle() const ControlSlider* ShaderBlur::createSliderCtl() { auto screenSize = Director::getInstance()->getWinSize(); - + ControlSlider *slider = ControlSlider::create("extensions/sliderTrack.png","extensions/sliderProgress.png" ,"extensions/sliderThumb.png"); slider->setAnchorPoint(Point(0.5f, 1.0f)); slider->setMinimumValue(0.0f); // Sets the min value of range - slider->setMaximumValue(3.0f); // Sets the max value of range - slider->setValue(1.0f); + slider->setMaximumValue(25.0f); // Sets the max value of range + slider->setPosition(Point(screenSize.width / 2.0f, screenSize.height / 3.0f)); // When the value of the slider will change, the given selector will be call slider->addTargetWithActionForControlEvents(this, cccontrol_selector(ShaderBlur::sliderAction), Control::EventType::VALUE_CHANGED); + slider->setValue(2.0f); return slider; From d50391e5dd15df1660e422983d10fef81611fe21 Mon Sep 17 00:00:00 2001 From: heliclei Date: Fri, 28 Feb 2014 23:02:22 +0800 Subject: [PATCH 32/69] add CCConosle [autotest run] command --- .../ActionManagerTest/ActionManagerTest.cpp | 15 ++-- .../ActionManagerTest/ActionManagerTest.h | 12 +-- .../ActionsEaseTest/ActionsEaseTest.cpp | 48 ++++++------ .../Classes/ActionsEaseTest/ActionsEaseTest.h | 48 ++++++------ tests/Classes/LayerTest/LayerTest.cpp | 20 ++--- tests/Classes/LayerTest/LayerTest.h | 18 ++--- .../NewRendererTest/NewRendererTest.cpp | 4 +- tests/Classes/NodeTest/NodeTest.cpp | 22 +++--- tests/Classes/NodeTest/NodeTest.h | 22 +++--- tests/Classes/ParticleTest/ParticleTest.cpp | 38 +++++----- tests/Classes/ParticleTest/ParticleTest.h | 38 +++++----- .../SpriteTest/SpriteTest.cpp.REMOVED.git-id | 2 +- tests/Classes/controller.cpp | 74 ++++++++++++++++++- 13 files changed, 217 insertions(+), 144 deletions(-) diff --git a/tests/Classes/ActionManagerTest/ActionManagerTest.cpp b/tests/Classes/ActionManagerTest/ActionManagerTest.cpp index a62e810d4d..112b16e9ca 100644 --- a/tests/Classes/ActionManagerTest/ActionManagerTest.cpp +++ b/tests/Classes/ActionManagerTest/ActionManagerTest.cpp @@ -78,10 +78,13 @@ ActionManagerTest::~ActionManagerTest(void) } std::string ActionManagerTest::title() const +{ + return "ActionManager Test"; +} +std::string ActionManagerTest::subtitle() const { return "No title"; } - void ActionManagerTest::restartCallback(Ref* sender) { auto s = new ActionManagerTestScene(); @@ -144,7 +147,7 @@ void CrashTest::removeThis() nextCallback(this); } -std::string CrashTest::title() const +std::string CrashTest::subtitle() const { return "Test 1. Should not crash"; } @@ -175,7 +178,7 @@ void LogicTest::bugMe(Node* node) node->runAction(ScaleTo::create(2, 2)); } -std::string LogicTest::title() const +std::string LogicTest::subtitle() const { return "Logic test"; } @@ -223,7 +226,7 @@ void PauseTest::unpause(float dt) director->getActionManager()->resumeTarget(node); } -std::string PauseTest::title() const +std::string PauseTest::subtitle() const { return "Pause Test"; } @@ -259,7 +262,7 @@ void RemoveTest::stopAction() sprite->stopActionByTag(kTagSequence); } -std::string RemoveTest::title() const +std::string RemoveTest::subtitle() const { return "Remove Test"; } @@ -269,7 +272,7 @@ std::string RemoveTest::title() const // ResumeTest // //------------------------------------------------------------------ -std::string ResumeTest::title() const +std::string ResumeTest::subtitle() const { return "Resume Test"; } diff --git a/tests/Classes/ActionManagerTest/ActionManagerTest.h b/tests/Classes/ActionManagerTest/ActionManagerTest.h index 91efe57837..4b123cc9b8 100644 --- a/tests/Classes/ActionManagerTest/ActionManagerTest.h +++ b/tests/Classes/ActionManagerTest/ActionManagerTest.h @@ -16,7 +16,7 @@ public: ~ActionManagerTest(void); virtual std::string title() const override; - + virtual std::string subtitle() const override; void restartCallback(Ref* sender); void nextCallback(Ref* sender); void backCallback(Ref* sender); @@ -25,7 +25,7 @@ public: class CrashTest : public ActionManagerTest { public: - virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void onEnter() override; void removeThis(); }; @@ -33,7 +33,7 @@ public: class LogicTest : public ActionManagerTest { public: - virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void onEnter() override; void bugMe(Node* node); }; @@ -41,7 +41,7 @@ public: class PauseTest : public ActionManagerTest { public: - virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void onEnter() override; void unpause(float dt); }; @@ -49,7 +49,7 @@ public: class RemoveTest : public ActionManagerTest { public: - virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void onEnter() override; void stopAction(); }; @@ -57,7 +57,7 @@ public: class ResumeTest : public ActionManagerTest { public: - virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void onEnter() override; void resumeGrossini(float time); }; diff --git a/tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp b/tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp index e3e4976755..03d0b82994 100644 --- a/tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp +++ b/tests/Classes/ActionsEaseTest/ActionsEaseTest.cpp @@ -119,7 +119,7 @@ void SpriteEase::testStopAction(float dt) _grossini->stopActionByTag(1); } -std::string SpriteEase::title() const +std::string SpriteEase::subtitle() const { return "EaseIn - EaseOut - Stop"; } @@ -159,7 +159,7 @@ void SpriteEaseInOut::onEnter() } -std::string SpriteEaseInOut::title() const +std::string SpriteEaseInOut::subtitle() const { return "EaseInOut and rates"; } @@ -196,7 +196,7 @@ void SpriteEaseExponential::onEnter() } -std::string SpriteEaseExponential::title() const +std::string SpriteEaseExponential::subtitle() const { return "ExpIn - ExpOut actions"; } @@ -229,7 +229,7 @@ void SpriteEaseExponentialInOut::onEnter() } -std::string SpriteEaseExponentialInOut::title() const +std::string SpriteEaseExponentialInOut::subtitle() const { return "EaseExponentialInOut action"; } @@ -266,7 +266,7 @@ void SpriteEaseSine::onEnter() } -std::string SpriteEaseSine::title() const +std::string SpriteEaseSine::subtitle() const { return "EaseSineIn - EaseSineOut"; } @@ -298,7 +298,7 @@ void SpriteEaseSineInOut::onEnter() } -std::string SpriteEaseSineInOut::title() const +std::string SpriteEaseSineInOut::subtitle() const { return "EaseSineInOut action"; } @@ -333,7 +333,7 @@ void SpriteEaseElastic::onEnter() } -std::string SpriteEaseElastic::title() const +std::string SpriteEaseElastic::subtitle() const { return "Elastic In - Out actions"; } @@ -371,7 +371,7 @@ void SpriteEaseElasticInOut::onEnter() } -std::string SpriteEaseElasticInOut::title() const +std::string SpriteEaseElasticInOut::subtitle() const { return "EaseElasticInOut action"; } @@ -408,7 +408,7 @@ void SpriteEaseBounce::onEnter() } -std::string SpriteEaseBounce::title() const +std::string SpriteEaseBounce::subtitle() const { return "Bounce In - Out actions"; } @@ -442,7 +442,7 @@ void SpriteEaseBounceInOut::onEnter() } -std::string SpriteEaseBounceInOut::title() const +std::string SpriteEaseBounceInOut::subtitle() const { return "EaseBounceInOut action"; } @@ -478,7 +478,7 @@ void SpriteEaseBack::onEnter() } -std::string SpriteEaseBack::title() const +std::string SpriteEaseBack::subtitle() const { return "Back In - Out actions"; } @@ -511,7 +511,7 @@ void SpriteEaseBackInOut::onEnter() } -std::string SpriteEaseBackInOut::title() const +std::string SpriteEaseBackInOut::subtitle() const { return "EaseBackInOut action"; } @@ -573,7 +573,7 @@ void SpriteEaseBezier::onEnter() } -std::string SpriteEaseBezier::title()const +std::string SpriteEaseBezier::subtitle()const { return "SpriteEaseBezier action"; } @@ -608,7 +608,7 @@ void SpriteEaseQuadratic::onEnter() _kathia->runAction( RepeatForever::create(seq3)); } -std::string SpriteEaseQuadratic::title() const +std::string SpriteEaseQuadratic::subtitle() const { return "SpriteEaseQuadratic action"; } @@ -640,7 +640,7 @@ void SpriteEaseQuadraticInOut::onEnter() _tamara->runAction( RepeatForever::create(seq2)); } -std::string SpriteEaseQuadraticInOut::title()const +std::string SpriteEaseQuadraticInOut::subtitle()const { return "SpriteEaseQuadraticInOut action"; } @@ -676,7 +676,7 @@ void SpriteEaseQuartic::onEnter() _kathia->runAction( RepeatForever::create(seq3)); } -std::string SpriteEaseQuartic::title()const +std::string SpriteEaseQuartic::subtitle()const { return "SpriteEaseQuartic action"; } @@ -708,7 +708,7 @@ void SpriteEaseQuarticInOut::onEnter() _tamara->runAction( RepeatForever::create(seq2)); } -std::string SpriteEaseQuarticInOut::title()const +std::string SpriteEaseQuarticInOut::subtitle()const { return "SpriteEaseQuarticInOut action"; } @@ -743,7 +743,7 @@ void SpriteEaseQuintic::onEnter() _kathia->runAction( RepeatForever::create(seq3)); } -std::string SpriteEaseQuintic::title()const +std::string SpriteEaseQuintic::subtitle()const { return "SpriteEaseQuintic action"; } @@ -776,7 +776,7 @@ void SpriteEaseQuinticInOut::onEnter() _tamara->runAction( RepeatForever::create(seq2)); } -std::string SpriteEaseQuinticInOut::title()const +std::string SpriteEaseQuinticInOut::subtitle()const { return "SpriteEaseQuinticInOut action"; } @@ -811,7 +811,7 @@ void SpriteEaseCircle::onEnter() _kathia->runAction( RepeatForever::create(seq3)); } -std::string SpriteEaseCircle::title()const +std::string SpriteEaseCircle::subtitle()const { return "SpriteEaseCircle action"; } @@ -844,7 +844,7 @@ void SpriteEaseCircleInOut::onEnter() _tamara->runAction( RepeatForever::create(seq2)); } -std::string SpriteEaseCircleInOut::title()const +std::string SpriteEaseCircleInOut::subtitle()const { return "SpriteEaseCircleInOut action"; } @@ -879,7 +879,7 @@ void SpriteEaseCubic::onEnter() _kathia->runAction( RepeatForever::create(seq3)); } -std::string SpriteEaseCubic::title()const +std::string SpriteEaseCubic::subtitle()const { return "SpriteEaseCubic action"; } @@ -964,7 +964,7 @@ void SpeedTest::altertime(float dt) action3->setSpeed( CCRANDOM_MINUS1_1() * 2 ); } -std::string SpeedTest::title() const +std::string SpeedTest::subtitle() const { return "Speed action"; } @@ -1072,7 +1072,7 @@ void EaseSpriteDemo::positionForTwo() } -std::string EaseSpriteDemo::title() const +std::string EaseSpriteDemo::subtitle() const { return "No title"; } diff --git a/tests/Classes/ActionsEaseTest/ActionsEaseTest.h b/tests/Classes/ActionsEaseTest/ActionsEaseTest.h index 9bee8f82c9..f19a4436a8 100644 --- a/tests/Classes/ActionsEaseTest/ActionsEaseTest.h +++ b/tests/Classes/ActionsEaseTest/ActionsEaseTest.h @@ -45,7 +45,7 @@ public: EaseSpriteDemo(void); ~EaseSpriteDemo(void); - virtual std::string title() const override; + virtual std::string subtitle() const override; virtual void onEnter() override; void centerSprites(unsigned int numberOfSprites); @@ -61,7 +61,7 @@ class SpriteEase : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; void testStopAction(float dt); }; @@ -70,126 +70,126 @@ class SpriteEaseInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseExponential : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseExponentialInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseSine : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseSineInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseElastic : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseElasticInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseBounce : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseBounceInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseBack : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseBackInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseBezier : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseQuadratic : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseQuadraticInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseQuartic : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseQuarticInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseQuintic : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseQuinticInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; @@ -197,21 +197,21 @@ class SpriteEaseCircle : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseCircleInOut : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseCubic : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class SpriteEaseCubicInOut : public EaseSpriteDemo @@ -224,7 +224,7 @@ class SpeedTest : public EaseSpriteDemo { public: void onEnter(); - virtual std::string title() const override; + virtual std::string subtitle() const override; void altertime(float dt); }; diff --git a/tests/Classes/LayerTest/LayerTest.cpp b/tests/Classes/LayerTest/LayerTest.cpp index 8e8e2b327a..4597a9a716 100644 --- a/tests/Classes/LayerTest/LayerTest.cpp +++ b/tests/Classes/LayerTest/LayerTest.cpp @@ -78,7 +78,7 @@ std::string LayerTest::subtitle() const std::string LayerTest::title() const { - return "No title"; + return "Layer Test"; } void LayerTest::onEnter() @@ -167,7 +167,7 @@ void LayerTestCascadingOpacityA::onEnter() setEnableRecursiveCascading(this, true); } -std::string LayerTestCascadingOpacityA::title() const +std::string LayerTestCascadingOpacityA::subtitle() const { return "Layer: cascading opacity"; } @@ -219,7 +219,7 @@ void LayerTestCascadingOpacityB::onEnter() setEnableRecursiveCascading(this, true); } -std::string LayerTestCascadingOpacityB::title() const +std::string LayerTestCascadingOpacityB::subtitle() const { return "CCLayerColor: cascading opacity"; } @@ -269,7 +269,7 @@ void LayerTestCascadingOpacityC::onEnter() NULL))); } -std::string LayerTestCascadingOpacityC::title() const +std::string LayerTestCascadingOpacityC::subtitle() const { return "CCLayerColor: non-cascading opacity"; } @@ -323,7 +323,7 @@ void LayerTestCascadingColorA::onEnter() } -std::string LayerTestCascadingColorA::title() const +std::string LayerTestCascadingColorA::subtitle() const { return "Layer: cascading color"; } @@ -375,7 +375,7 @@ void LayerTestCascadingColorB::onEnter() setEnableRecursiveCascading(this, true); } -std::string LayerTestCascadingColorB::title() const +std::string LayerTestCascadingColorB::subtitle() const { return "CCLayerColor: cascading color"; } @@ -424,7 +424,7 @@ void LayerTestCascadingColorC::onEnter() NULL))); } -std::string LayerTestCascadingColorC::title() const +std::string LayerTestCascadingColorC::subtitle() const { return "CCLayerColor: non-cascading color"; } @@ -481,7 +481,7 @@ void LayerTest1::onTouchesEnded(const std::vector& touches, Event *even onTouchesMoved(touches, event); } -std::string LayerTest1::title() const +std::string LayerTest1::subtitle() const { return "ColorLayer resize (tap & move)"; } @@ -517,7 +517,7 @@ void LayerTest2::onEnter() layer2->runAction(seq2); } -std::string LayerTest2::title() const +std::string LayerTest2::subtitle() const { return "ColorLayer: fade and tint"; } @@ -569,7 +569,7 @@ void LayerTestBlend::newBlend(float dt) } -std::string LayerTestBlend::title() const +std::string LayerTestBlend::subtitle() const { return "ColorLayer: blend"; } diff --git a/tests/Classes/LayerTest/LayerTest.h b/tests/Classes/LayerTest/LayerTest.h index 44ba2e4c8e..84c83d6cc9 100644 --- a/tests/Classes/LayerTest/LayerTest.h +++ b/tests/Classes/LayerTest/LayerTest.h @@ -28,7 +28,7 @@ class LayerTestCascadingOpacityA : public LayerTest public: CREATE_FUNC(LayerTestCascadingOpacityA); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class LayerTestCascadingOpacityB : public LayerTest @@ -36,7 +36,7 @@ class LayerTestCascadingOpacityB : public LayerTest public: CREATE_FUNC(LayerTestCascadingOpacityB); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class LayerTestCascadingOpacityC : public LayerTest @@ -44,7 +44,7 @@ class LayerTestCascadingOpacityC : public LayerTest public: CREATE_FUNC(LayerTestCascadingOpacityC); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class LayerTestCascadingColorA : public LayerTest @@ -52,7 +52,7 @@ class LayerTestCascadingColorA : public LayerTest public: CREATE_FUNC(LayerTestCascadingColorA); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class LayerTestCascadingColorB : public LayerTest @@ -60,7 +60,7 @@ class LayerTestCascadingColorB : public LayerTest public: CREATE_FUNC(LayerTestCascadingColorB); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class LayerTestCascadingColorC : public LayerTest @@ -68,7 +68,7 @@ class LayerTestCascadingColorC : public LayerTest public: CREATE_FUNC(LayerTestCascadingColorC); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; @@ -78,7 +78,7 @@ public: CREATE_FUNC(LayerTest1); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; void updateSize(Point &touchLocation); @@ -92,7 +92,7 @@ class LayerTest2 : public LayerTest public: CREATE_FUNC(LayerTest2); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; @@ -103,7 +103,7 @@ public: LayerTestBlend(); void newBlend(float dt); - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class LayerGradientTest : public LayerTest diff --git a/tests/Classes/NewRendererTest/NewRendererTest.cpp b/tests/Classes/NewRendererTest/NewRendererTest.cpp index dbbffa9baf..17e78aa0e7 100644 --- a/tests/Classes/NewRendererTest/NewRendererTest.cpp +++ b/tests/Classes/NewRendererTest/NewRendererTest.cpp @@ -91,12 +91,12 @@ MultiSceneTest::~MultiSceneTest() std::string MultiSceneTest::title() const { - return BaseTest::title(); + return "New Renderer"; } std::string MultiSceneTest::subtitle() const { - return BaseTest::subtitle(); + return "MultiSceneTest"; } void MultiSceneTest::onEnter() diff --git a/tests/Classes/NodeTest/NodeTest.cpp b/tests/Classes/NodeTest/NodeTest.cpp index f3e32b6a60..8336b6fbb5 100644 --- a/tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/Classes/NodeTest/NodeTest.cpp @@ -191,7 +191,7 @@ void Test2::onEnter() sp2->runAction(action2); } -std::string Test2::title() const +std::string Test2::subtitle() const { return "anchorPoint and children"; } @@ -233,7 +233,7 @@ void Test4::delay4(float dt) removeChildByTag(3, false); } -std::string Test4::title() const +std::string Test4::subtitle() const { return "tags"; } @@ -286,7 +286,7 @@ void Test5::addAndRemove(float dt) sp2->release(); } -std::string Test5::title() const +std::string Test5::subtitle() const { return "remove and cleanup"; } @@ -347,7 +347,7 @@ void Test6::addAndRemove(float dt) } -std::string Test6::title() const +std::string Test6::subtitle() const { return "remove/cleanup with children"; } @@ -400,7 +400,7 @@ void StressTest1::removeMe(Node* node) } -std::string StressTest1::title() const +std::string StressTest1::subtitle() const { return "stress test #1: no crashes"; } @@ -447,7 +447,7 @@ void StressTest2::shouldNotLeak(float dt) sublayer->removeAllChildrenWithCleanup(true); } -std::string StressTest2::title() const +std::string StressTest2::subtitle() const { return "stress test #2: no leaks"; } @@ -478,7 +478,7 @@ void SchedulerTest1::doSomething(float dt) } -std::string SchedulerTest1::title() const +std::string SchedulerTest1::subtitle() const { return "cocosnode scheduler test #1"; } @@ -517,7 +517,7 @@ NodeToWorld::NodeToWorld() back->runAction(fe2); } -std::string NodeToWorld::title() const +std::string NodeToWorld::subtitle() const { return "nodeToParent transform"; } @@ -566,7 +566,7 @@ NodeToWorld3D::NodeToWorld3D() parent->runAction(orbit); } -std::string NodeToWorld3D::title() const +std::string NodeToWorld3D::subtitle() const { return "nodeToParent transform in 3D"; } @@ -637,7 +637,7 @@ CameraOrbitTest::CameraOrbitTest() setScale( 1 ); } -std::string CameraOrbitTest::title() const +std::string CameraOrbitTest::subtitle() const { return "Camera Orbit test"; } @@ -706,7 +706,7 @@ void CameraZoomTest::update(float dt) // cam->setEye(0, 0, -_z); } -std::string CameraZoomTest::title() const +std::string CameraZoomTest::subtitle() const { return "Camera Zoom test"; } diff --git a/tests/Classes/NodeTest/NodeTest.h b/tests/Classes/NodeTest/NodeTest.h index d30fc391e8..5938eb9a4f 100644 --- a/tests/Classes/NodeTest/NodeTest.h +++ b/tests/Classes/NodeTest/NodeTest.h @@ -52,7 +52,7 @@ class Test2 : public TestCocosNodeDemo public: CREATE_FUNC(Test2); virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class Test4 : public TestCocosNodeDemo @@ -62,7 +62,7 @@ public: void delay2(float dt); void delay4(float dt); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: Test4(); @@ -74,7 +74,7 @@ public: CREATE_FUNC(Test5); void addAndRemove(float dt); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: Test5(); @@ -85,7 +85,7 @@ class Test6 : public TestCocosNodeDemo public: CREATE_FUNC(Test6); void addAndRemove(float dt); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: Test6(); @@ -97,7 +97,7 @@ public: CREATE_FUNC(StressTest1); void shouldNotCrash(float dt); void removeMe(Node* node); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: StressTest1(); @@ -108,7 +108,7 @@ class StressTest2 : public TestCocosNodeDemo public: CREATE_FUNC(StressTest2); void shouldNotLeak(float dt); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: StressTest2(); @@ -119,7 +119,7 @@ class SchedulerTest1 : public TestCocosNodeDemo public: CREATE_FUNC(SchedulerTest1); void doSomething(float dt); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: SchedulerTest1(); @@ -129,7 +129,7 @@ class NodeToWorld : public TestCocosNodeDemo { public: CREATE_FUNC(NodeToWorld); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: NodeToWorld(); @@ -139,7 +139,7 @@ class NodeToWorld3D : public TestCocosNodeDemo { public: CREATE_FUNC(NodeToWorld3D); - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: NodeToWorld3D(); @@ -151,7 +151,7 @@ public: CREATE_FUNC(CameraOrbitTest); virtual void onEnter() override; virtual void onExit() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: CameraOrbitTest(); @@ -165,7 +165,7 @@ public: virtual void onEnter() override; virtual void onExit() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; protected: CameraZoomTest(); diff --git a/tests/Classes/ParticleTest/ParticleTest.cpp b/tests/Classes/ParticleTest/ParticleTest.cpp index 5ff2d34e6b..91acbfa91a 100644 --- a/tests/Classes/ParticleTest/ParticleTest.cpp +++ b/tests/Classes/ParticleTest/ParticleTest.cpp @@ -27,7 +27,7 @@ void DemoFirework::onEnter() setEmitterPosition(); } -std::string DemoFirework::title() const +std::string DemoFirework::subtitle() const { return "ParticleFireworks"; } @@ -53,7 +53,7 @@ void DemoFire::onEnter() setEmitterPosition(); } -std::string DemoFire::title() const +std::string DemoFire::subtitle() const { return "ParticleFire"; } @@ -76,7 +76,7 @@ void DemoSun::onEnter() setEmitterPosition(); } -std::string DemoSun::title() const +std::string DemoSun::subtitle() const { return "ParticleSun"; } @@ -99,7 +99,7 @@ void DemoGalaxy::onEnter() setEmitterPosition(); } -std::string DemoGalaxy::title() const +std::string DemoGalaxy::subtitle() const { return "ParticleGalaxy"; } @@ -121,7 +121,7 @@ void DemoFlower::onEnter() setEmitterPosition(); } -std::string DemoFlower::title() const +std::string DemoFlower::subtitle() const { return "ParticleFlower"; } @@ -204,7 +204,7 @@ void DemoBigFlower::onEnter() setEmitterPosition(); } -std::string DemoBigFlower::title() const +std::string DemoBigFlower::subtitle() const { return "ParticleBigFlower"; } @@ -288,7 +288,7 @@ void DemoRotFlower::onEnter() setEmitterPosition(); } -std::string DemoRotFlower::title() const +std::string DemoRotFlower::subtitle() const { return "ParticleRotFlower"; } @@ -311,7 +311,7 @@ void DemoMeteor::onEnter() setEmitterPosition(); } -std::string DemoMeteor::title() const +std::string DemoMeteor::subtitle() const { return "ParticleMeteor"; } @@ -334,7 +334,7 @@ void DemoSpiral::onEnter() setEmitterPosition(); } -std::string DemoSpiral::title() const +std::string DemoSpiral::subtitle() const { return "ParticleSpiral"; } @@ -359,7 +359,7 @@ void DemoExplosion::onEnter() setEmitterPosition(); } -std::string DemoExplosion::title() const +std::string DemoExplosion::subtitle() const { return "ParticleExplosion"; } @@ -384,7 +384,7 @@ void DemoSmoke::onEnter() setEmitterPosition(); } -std::string DemoSmoke::title() const +std::string DemoSmoke::subtitle() const { return "ParticleSmoke"; } @@ -432,7 +432,7 @@ void DemoSnow::onEnter() setEmitterPosition(); } -std::string DemoSnow::title() const +std::string DemoSnow::subtitle() const { return "ParticleSnow"; } @@ -459,7 +459,7 @@ void DemoRain::onEnter() setEmitterPosition(); } -std::string DemoRain::title() const +std::string DemoRain::subtitle() const { return "ParticleRain"; } @@ -544,7 +544,7 @@ void DemoModernArt::onEnter() setEmitterPosition(); } -std::string DemoModernArt::title() const +std::string DemoModernArt::subtitle() const { return "Varying size"; } @@ -573,7 +573,7 @@ void DemoRing::onEnter() setEmitterPosition(); } -std::string DemoRing::title() const +std::string DemoRing::subtitle() const { return "Ring Demo"; } @@ -616,7 +616,7 @@ void ParallaxParticle::onEnter() p->runAction(RepeatForever::create(seq)); } -std::string ParallaxParticle::title() const +std::string ParallaxParticle::subtitle() const { return "Parallax + Particles"; } @@ -700,7 +700,7 @@ void RadiusMode1::onEnter() _emitter->setBlendAdditive(false); } -std::string RadiusMode1::title() const +std::string RadiusMode1::subtitle() const { return "Radius Mode: Spiral"; } @@ -784,7 +784,7 @@ void RadiusMode2::onEnter() _emitter->setBlendAdditive(false); } -std::string RadiusMode2::title() const +std::string RadiusMode2::subtitle() const { return "Radius Mode: Semi Circle"; } @@ -1106,7 +1106,7 @@ void ParticleDemo::onEnter(void) std::string ParticleDemo::title() const { - return "No title"; + return "Particle Demo"; } std::string ParticleDemo::subtitle() const diff --git a/tests/Classes/ParticleTest/ParticleTest.h b/tests/Classes/ParticleTest/ParticleTest.h index 42d91981e7..fc328ea3d1 100644 --- a/tests/Classes/ParticleTest/ParticleTest.h +++ b/tests/Classes/ParticleTest/ParticleTest.h @@ -45,112 +45,112 @@ class DemoFirework : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoFire : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoSun : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoGalaxy : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoFlower : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoBigFlower : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoRotFlower : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoMeteor : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoSpiral : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoExplosion : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoSmoke : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoSnow : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoRain : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoModernArt : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoRing : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class ParallaxParticle : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class DemoParticleFromFile : public ParticleDemo @@ -162,7 +162,7 @@ public: _title = file; } virtual void onEnter() override; - virtual std::string title() const override + virtual std::string subtitle() const override { return _title; } @@ -172,14 +172,14 @@ class RadiusMode1 : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class RadiusMode2 : public ParticleDemo { public: virtual void onEnter() override; - virtual std::string title() const override; + virtual std::string subtitle() const override; }; class Issue704 : public ParticleDemo diff --git a/tests/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id b/tests/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id index e3d8aeba62..dc9c7fc3e4 100644 --- a/tests/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id +++ b/tests/Classes/SpriteTest/SpriteTest.cpp.REMOVED.git-id @@ -1 +1 @@ -d381f5336bd2e06ba65eb51a5204c12eebe49c4e \ No newline at end of file +39606c4582eeb2df1285728e81b8f9553a527bc1 \ No newline at end of file diff --git a/tests/Classes/controller.cpp b/tests/Classes/controller.cpp index fbf602c954..ea7ae80d68 100644 --- a/tests/Classes/controller.cpp +++ b/tests/Classes/controller.cpp @@ -3,7 +3,7 @@ #include #include #include - +#include // test inclues #include "AppDelegate.h" #include "BaseTest.h" @@ -111,6 +111,12 @@ static Controller *currentController = nullptr; static Point s_tCurPos = Point::ZERO; +//sleep for t seconds +static void wait(int t) +{ + usleep(t * 1000 * 1000); +} + TestController::TestController() : _beginPos(Point::ZERO) { @@ -337,13 +343,77 @@ void TestController::addConsoleAutoTest() return; } + if(args == "run") + { + for (int i = 0; i < g_testCount; i++) + { + // create the test scene and run it + auto scene = g_aTestNames[i].callback(); + + if (scene) + { + std::string msg("autotest: running test:"); + msg += g_aTestNames[i].test_name; + send(fd, msg.c_str(), strlen(msg.c_str()),0); + send(fd, "\n",1,0); + + currentController = &g_aTestNames[i]; + sched->performFunctionInCocosThread( [&](){ + currentController->callback()->runThisTest(); + currentController->callback()->release(); + } ); + wait(1); + BaseTest* firstTest = app->getCurrentTest(); + if(firstTest == nullptr) + { + continue; + } + std::string t1(""); + t1 += firstTest->subtitle(); + send(fd, t1.c_str(), strlen(t1.c_str()),0); + send(fd, "\n",1,0); + wait(2); + + //printf("rtti:%s", typeid(firstTest).name()); + while(1) + { + //currentTest->nextCallback(nullptr); + sched->performFunctionInCocosThread( [&](){ + BaseTest *t = app->getCurrentTest(); + if(t != nullptr) + { + t->nextCallback(nullptr); + } + } ); + wait(1); + BaseTest * curTest = app->getCurrentTest(); + if(curTest == nullptr) + { + break; + } + std::string title(""); + title += curTest->subtitle(); + send(fd, title.c_str(), strlen(title.c_str()),0); + send(fd, "\n",1,0); + wait(2); + + if(t1 == title) + { + break; + } + + } + } + + } + } + for(int i = 0; i < g_testCount; i++) { if(args == g_aTestNames[i].test_name) { // create the test scene and run it auto scene = g_aTestNames[i].callback(); - if (scene) { std::string msg("autotest: running test:"); From 02bf79f0759e14d635acb083c0f2ecc817394a85 Mon Sep 17 00:00:00 2001 From: heliclei Date: Fri, 28 Feb 2014 23:41:01 +0800 Subject: [PATCH 33/69] fix windows compile error --- tests/Classes/controller.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/Classes/controller.cpp b/tests/Classes/controller.cpp index ea7ae80d68..8ffa816786 100644 --- a/tests/Classes/controller.cpp +++ b/tests/Classes/controller.cpp @@ -3,7 +3,8 @@ #include #include #include -#include +#include +#include // test inclues #include "AppDelegate.h" #include "BaseTest.h" @@ -114,7 +115,8 @@ static Point s_tCurPos = Point::ZERO; //sleep for t seconds static void wait(int t) { - usleep(t * 1000 * 1000); + std::chrono::milliseconds dura( t * 1000 ); + std::this_thread::sleep_for( dura ); } TestController::TestController() From 6920bec6efcf5e806475880b07eed9a45c01b7d3 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 11:20:53 -0800 Subject: [PATCH 34/69] transform object returns the MV code cleaner. the kmGL code is altogether --- cocos/2d/CCClippingNode.cpp | 11 ++++++-- cocos/2d/CCLabel.cpp | 11 ++++++-- cocos/2d/CCNode.cpp | 28 +++++++++---------- cocos/2d/CCNode.h | 2 +- cocos/2d/CCNodeGrid.cpp | 14 +++++++--- cocos/2d/CCParticleBatchNode.cpp | 10 +++++-- cocos/2d/CCRenderTexture.cpp | 10 +++++-- cocos/2d/CCSpriteBatchNode.cpp | 10 +++++-- .../editor-support/cocostudio/CCArmature.cpp | 10 +++++-- .../editor-support/cocostudio/CCBatchNode.cpp | 9 ++++-- cocos/gui/UILayout.cpp | 10 +++++-- extensions/GUI/CCScrollView/CCScrollView.cpp | 10 +++++-- .../ClippingNodeTest/ClippingNodeTest.cpp | 4 +-- 13 files changed, 94 insertions(+), 45 deletions(-) diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 4fe5438493..6417e9e458 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -204,11 +204,16 @@ void ClippingNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool if(!_visible) return; - kmGLPushMatrix(); - bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); + //Add group command _groupCommand.init(_globalZOrder); diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index 877d9f88a8..b0f488568f 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -693,11 +693,16 @@ void Label::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parent return; } - kmGLPushMatrix(); - bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); + draw(renderer, _modelViewTransform, dirty); kmGLPopMatrix(); diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index fc59f584c2..1eca50367e 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -925,13 +925,17 @@ void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentT { return; } - - kmGLPushMatrix(); bool dirty = _transformDirty || parentTransformDirty; - if(dirty) - this->transform(); + _modelViewTransform = this->transform(parentTransform); + + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); int i = 0; @@ -967,21 +971,17 @@ void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentT void Node::transformAncestors() { - if( _parent != nullptr ) - { - _parent->transformAncestors(); - _parent->transform(); - } + // remove me + CCASSERT(false, "no longer supported"); } -void Node::transform() +kmMat4 Node::transform(const kmMat4& parentTransform) { + kmMat4 ret; kmMat4 transfrom4x4 = this->getNodeToParentTransform(); + kmMat4Multiply(&ret, &parentTransform, &transfrom4x4); - kmGLMultMatrix( &transfrom4x4 ); - - // saves the MV matrix - kmGLGetMatrix(KM_GL_MODELVIEW, &_modelViewTransform); + return ret; } void Node::onEnter() diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index c9911df79d..e9b04215d2 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1256,7 +1256,7 @@ public: /** * Performs OpenGL view-matrix transformation based on position, scale, rotation and other attributes. */ - void transform(); + kmMat4 transform(const kmMat4 &parentTransform); /** * Performs OpenGL view-matrix transformation of it's ancestors. * Generally the ancestors are already transformed, but in certain cases (eg: attaching a FBO) diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index 6fe62fb361..a94bfcecb0 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -94,7 +94,16 @@ void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool par renderer->addCommand(&_groupCommand); renderer->pushGroup(_groupCommand.getRenderQueueID()); + bool dirty = parentTransformDirty || _transformDirty; + if(dirty) + _modelViewTransform = this->transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); + Director::Projection beforeProjectionType; if(_nodeGrid && _nodeGrid->isActive()) { @@ -106,10 +115,7 @@ void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool par _gridBeginCommand.func = CC_CALLBACK_0(NodeGrid::onGridBeginDraw, this); renderer->addCommand(&_gridBeginCommand); - bool dirty = parentTransformDirty || _transformDirty; - if(dirty) - this->transform(); - + if(_gridTarget) { _gridTarget->visit(renderer, _modelViewTransform, dirty); diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index 5cc31db804..7f68da628b 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -134,11 +134,15 @@ void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, return; } - kmGLPushMatrix(); - bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); draw(renderer, _modelViewTransform, dirty); diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 0b2397b866..91eaedae55 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -370,11 +370,15 @@ void RenderTexture::visit(Renderer *renderer, const kmMat4 &parentTransform, boo return; } - kmGLPushMatrix(); - bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); _sprite->visit(renderer, _modelViewTransform, dirty); draw(renderer, _modelViewTransform, dirty); diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index 2c813aaeaa..f5d38a732b 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -147,13 +147,17 @@ void SpriteBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, b return; } - kmGLPushMatrix(); - sortAllChildren(); bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); draw(renderer, _modelViewTransform, dirty); diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index c08ed2a87f..3599e9d867 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -452,11 +452,17 @@ void Armature::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, { return; } - kmGLPushMatrix(); bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); + sortAllChildren(); draw(renderer, _modelViewTransform, dirty); diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index 6b2815b099..58841cb695 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -108,11 +108,16 @@ void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool pa { return; } - kmGLPushMatrix(); bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); sortAllChildren(); draw(renderer, _modelViewTransform, dirty); diff --git a/cocos/gui/UILayout.cpp b/cocos/gui/UILayout.cpp index 9eb8723ad2..e33742808c 100644 --- a/cocos/gui/UILayout.cpp +++ b/cocos/gui/UILayout.cpp @@ -204,10 +204,16 @@ void Layout::stencilClippingVisit(Renderer *renderer, const kmMat4 &parentTransf if(!_visible) return; - kmGLPushMatrix(); bool dirty = parentTransformDirty || _transformDirty; if(dirty) - transform(); + _modelViewTransform = transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); + //Add group command _groupCommand.init(_globalZOrder); diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index b8914f6447..f681ba2339 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -560,11 +560,15 @@ void ScrollView::visit(Renderer *renderer, const kmMat4 &parentTransform, bool p return; } - kmGLPushMatrix(); - bool dirty = parentTransformDirty || _transformDirty; if(dirty) - this->transform(); + _modelViewTransform = this->transform(parentTransform); + + // IMPORTANT: + // To ease the migration to v3.0, we still support the kmGL stack, + // but it is deprecated and your code should not rely on it + kmGLPushMatrix(); + kmGLLoadMatrix(&_modelViewTransform); this->beforeDraw(); diff --git a/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp index 59d1c8e2d0..0949d0163a 100644 --- a/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp +++ b/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp @@ -633,7 +633,7 @@ void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, boo ++iter; kmGLPushMatrix(); - this->transform(); + _modelViewTransform = this->transform(transform); _sprites.at(i)->visit(renderer, _modelViewTransform, transformDirty); kmGLPopMatrix(); @@ -643,7 +643,7 @@ void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, boo ++iter; kmGLPushMatrix(); - this->transform(); + _modelViewTransform = this->transform(transform); _sprites.at(i)->visit(renderer, _modelViewTransform, transformDirty); kmGLPopMatrix(); } From 13b60c87594affc7920b43df30f880560676d3bf Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 13:48:00 -0800 Subject: [PATCH 35/69] Applies Wu Hao's patch for 2.5D --- cocos/2d/CCNode.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 1eca50367e..7dbfa93d47 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -336,8 +336,8 @@ void Node::setScale(float scale) { if (_scaleX == scale) return; - - _scaleX = _scaleY = scale; + + _scaleX = _scaleY = _scaleZ = scale; _transformDirty = _inverseDirty = true; } From d78304599d9e7c2875468d24530d69e6f6c43c66 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 16:10:48 -0800 Subject: [PATCH 36/69] Cache working OK. Performance increased in 20% for static objects. --- cocos/2d/CCAtlasNode.cpp | 14 ++--- cocos/2d/CCAtlasNode.h | 2 +- cocos/2d/CCClippingNode.cpp | 5 +- cocos/2d/CCClippingNode.h | 2 +- cocos/2d/CCDirector.cpp | 2 +- cocos/2d/CCDrawNode.cpp | 4 +- cocos/2d/CCDrawNode.h | 2 +- cocos/2d/CCLabel.cpp | 9 +-- cocos/2d/CCLabel.h | 4 +- cocos/2d/CCLayer.cpp | 4 +- cocos/2d/CCLayer.h | 3 +- cocos/2d/CCMotionStreak.cpp | 8 +-- cocos/2d/CCMotionStreak.h | 12 +--- cocos/2d/CCNode.cpp | 60 +++++++++---------- cocos/2d/CCNode.h | 54 +++++++---------- cocos/2d/CCNodeGrid.cpp | 5 +- cocos/2d/CCNodeGrid.h | 2 +- cocos/2d/CCParallaxNode.cpp | 4 +- cocos/2d/CCParallaxNode.h | 2 +- cocos/2d/CCParticleBatchNode.cpp | 9 +-- cocos/2d/CCParticleBatchNode.h | 4 +- cocos/2d/CCParticleSystemQuad.cpp | 10 ++-- cocos/2d/CCParticleSystemQuad.h | 2 +- cocos/2d/CCProgressTimer.cpp | 4 +- cocos/2d/CCProgressTimer.h | 2 +- cocos/2d/CCRenderTexture.cpp | 9 +-- cocos/2d/CCRenderTexture.h | 4 +- cocos/2d/CCSprite.cpp | 14 +++-- cocos/2d/CCSprite.h | 4 +- cocos/2d/CCSpriteBatchNode.cpp | 11 ++-- cocos/2d/CCSpriteBatchNode.h | 4 +- cocos/2d/CCTextFieldTTF.cpp | 6 +- cocos/2d/CCTextFieldTTF.h | 2 +- cocos/2d/CCTransition.cpp | 44 +++++++------- cocos/2d/CCTransition.h | 10 ++-- cocos/2d/CCTransitionPageTurn.cpp | 20 +++---- cocos/2d/CCTransitionPageTurn.h | 2 +- .../editor-support/cocostudio/CCArmature.cpp | 16 ++--- cocos/editor-support/cocostudio/CCArmature.h | 4 +- .../editor-support/cocostudio/CCBatchNode.cpp | 13 ++-- cocos/editor-support/cocostudio/CCBatchNode.h | 4 +- cocos/editor-support/cocostudio/CCSkin.cpp | 4 +- cocos/editor-support/cocostudio/CCSkin.h | 2 +- cocos/editor-support/spine/CCSkeleton.cpp | 4 +- cocos/editor-support/spine/CCSkeleton.h | 2 +- cocos/gui/UILayout.cpp | 17 +++--- cocos/gui/UILayout.h | 6 +- cocos/gui/UIWidget.cpp | 4 +- cocos/gui/UIWidget.h | 2 +- .../GUI/CCControlExtension/CCScale9Sprite.cpp | 4 +- .../GUI/CCControlExtension/CCScale9Sprite.h | 2 +- extensions/GUI/CCEditBox/CCEditBox.cpp | 4 +- extensions/GUI/CCEditBox/CCEditBox.h | 2 +- extensions/GUI/CCScrollView/CCScrollView.cpp | 5 +- extensions/GUI/CCScrollView/CCScrollView.h | 2 +- .../physics-nodes/CCPhysicsDebugNode.cpp | 4 +- extensions/physics-nodes/CCPhysicsDebugNode.h | 2 +- tests/Classes/ActionsTest/ActionsTest.cpp | 28 ++++----- tests/Classes/ActionsTest/ActionsTest.h | 10 ++-- tests/Classes/Box2DTest/Box2dTest.cpp | 6 +- tests/Classes/Box2DTest/Box2dTest.h | 2 +- tests/Classes/Box2DTestBed/Box2dView.cpp | 6 +- tests/Classes/Box2DTestBed/Box2dView.h | 2 +- .../ClippingNodeTest/ClippingNodeTest.cpp | 9 +-- .../ClippingNodeTest/ClippingNodeTest.h | 2 +- .../DrawPrimitivesTest/DrawPrimitivesTest.cpp | 4 +- .../DrawPrimitivesTest/DrawPrimitivesTest.h | 2 +- .../CocoStudioArmatureTest/ArmatureScene.cpp | 12 ++-- .../CocoStudioArmatureTest/ArmatureScene.h | 6 +- .../CocoStudioSceneTest/SceneEditorTest.cpp | 4 +- .../CocoStudioSceneTest/SceneEditorTest.h | 2 +- .../TableViewTest/CustomTableViewCell.cpp | 4 +- .../TableViewTest/CustomTableViewCell.h | 2 +- tests/Classes/LabelTest/LabelTest.cpp | 14 ++--- tests/Classes/LabelTest/LabelTest.h | 6 +- tests/Classes/LabelTest/LabelTestNew.cpp | 14 ++--- tests/Classes/LabelTest/LabelTestNew.h | 6 +- tests/Classes/MutiTouchTest/MutiTouchTest.cpp | 2 +- tests/Classes/NodeTest/NodeTest.cpp | 6 +- .../RenderTextureTest/RenderTextureTest.cpp | 25 ++++---- .../RenderTextureTest/RenderTextureTest.h | 4 +- tests/Classes/ShaderTest/ShaderTest.cpp | 10 ++-- tests/Classes/ShaderTest/ShaderTest.h | 2 +- tests/Classes/ShaderTest/ShaderTest2.cpp | 8 +-- tests/Classes/Texture2dTest/Texture2dTest.cpp | 13 ++-- tests/Classes/Texture2dTest/Texture2dTest.h | 4 +- tests/Classes/TileMapTest/TileMapTest.cpp | 12 ++-- tests/Classes/TileMapTest/TileMapTest.h | 6 +- 88 files changed, 338 insertions(+), 357 deletions(-) diff --git a/cocos/2d/CCAtlasNode.cpp b/cocos/2d/CCAtlasNode.cpp index 33bb3392d6..10cd780816 100644 --- a/cocos/2d/CCAtlasNode.cpp +++ b/cocos/2d/CCAtlasNode.cpp @@ -35,7 +35,6 @@ THE SOFTWARE. #include "CCDirector.h" #include "TransformUtils.h" #include "renderer/CCRenderer.h" -#include "renderer/CCQuadCommand.h" // external #include "kazmath/GL/matrix.h" @@ -110,8 +109,7 @@ bool AtlasNode::initWithTexture(Texture2D* texture, int tileWidth, int tileHeigh _quadsToDraw = itemsToRender; // shader stuff - setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_U_COLOR)); - _uniformColor = glGetUniformLocation( getShaderProgram()->getProgram(), "u_color"); + setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP)); return true; } @@ -138,20 +136,18 @@ void AtlasNode::updateAtlasValues() } // AtlasNode - draw -void AtlasNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void AtlasNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - auto shader = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP); - _quadCommand.init( _globalZOrder, _textureAtlas->getTexture()->getName(), - shader, + _shaderProgram, _blendFunc, _textureAtlas->getQuads(), _quadsToDraw, - _modelViewTransform); + transform); - Director::getInstance()->getRenderer()->addCommand(&_quadCommand); + renderer->addCommand(&_quadCommand); } diff --git a/cocos/2d/CCAtlasNode.h b/cocos/2d/CCAtlasNode.h index 2af1d89134..b7ff634856 100644 --- a/cocos/2d/CCAtlasNode.h +++ b/cocos/2d/CCAtlasNode.h @@ -69,7 +69,7 @@ public: // Overrides - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual Texture2D* getTexture() const override; virtual void setTexture(Texture2D *texture) override; virtual bool isOpacityModifyRGB() const override; diff --git a/cocos/2d/CCClippingNode.cpp b/cocos/2d/CCClippingNode.cpp index 6417e9e458..d243f38481 100644 --- a/cocos/2d/CCClippingNode.cpp +++ b/cocos/2d/CCClippingNode.cpp @@ -199,14 +199,15 @@ void ClippingNode::drawFullScreenQuadClearStencil() kmGLPopMatrix(); } -void ClippingNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void ClippingNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { if(!_visible) return; - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, diff --git a/cocos/2d/CCClippingNode.h b/cocos/2d/CCClippingNode.h index 6f0606adc4..bda23ebbca 100644 --- a/cocos/2d/CCClippingNode.h +++ b/cocos/2d/CCClippingNode.h @@ -95,7 +95,7 @@ public: * @lua NA */ virtual void onExit() override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; protected: ClippingNode(); diff --git a/cocos/2d/CCDirector.cpp b/cocos/2d/CCDirector.cpp index 3361ecacf3..de204a7ca4 100644 --- a/cocos/2d/CCDirector.cpp +++ b/cocos/2d/CCDirector.cpp @@ -282,7 +282,7 @@ void Director::drawScene() // draw the scene if (_runningScene) { - _runningScene->visit(_renderer, identity, true); + _runningScene->visit(_renderer, identity, false); _eventDispatcher->dispatchEvent(_eventAfterVisit); } diff --git a/cocos/2d/CCDrawNode.cpp b/cocos/2d/CCDrawNode.cpp index e695f2ae1e..b2112d0d1a 100644 --- a/cocos/2d/CCDrawNode.cpp +++ b/cocos/2d/CCDrawNode.cpp @@ -239,11 +239,11 @@ void DrawNode::render() CHECK_GL_ERROR_DEBUG(); } -void DrawNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void DrawNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(DrawNode::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void DrawNode::onDraw() diff --git a/cocos/2d/CCDrawNode.h b/cocos/2d/CCDrawNode.h index 1c7fd6eb82..c25b3bd47b 100644 --- a/cocos/2d/CCDrawNode.h +++ b/cocos/2d/CCDrawNode.h @@ -92,7 +92,7 @@ public: void onDraw(); // Overrides - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: DrawNode(); diff --git a/cocos/2d/CCLabel.cpp b/cocos/2d/CCLabel.cpp index b0f488568f..a8b1cb0c74 100644 --- a/cocos/2d/CCLabel.cpp +++ b/cocos/2d/CCLabel.cpp @@ -679,23 +679,24 @@ void Label::onDraw() CC_PROFILER_STOP("Label - draw"); } -void Label::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Label::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Label::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } -void Label::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Label::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { if (! _visible) { return; } - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, diff --git a/cocos/2d/CCLabel.h b/cocos/2d/CCLabel.h index 4be65b0137..098a4694c9 100644 --- a/cocos/2d/CCLabel.h +++ b/cocos/2d/CCLabel.h @@ -128,8 +128,8 @@ public: void addChild(Node * child, int zOrder=0, int tag=0) override; virtual std::string getDescription() const override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void onDraw(); virtual FontAtlas* getFontAtlas() const {return _fontAtlas;} diff --git a/cocos/2d/CCLayer.cpp b/cocos/2d/CCLayer.cpp index 97c00d86d0..3e1c29a32d 100644 --- a/cocos/2d/CCLayer.cpp +++ b/cocos/2d/CCLayer.cpp @@ -581,11 +581,11 @@ void LayerColor::updateColor() } } -void LayerColor::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void LayerColor::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(LayerColor::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); for(int i = 0; i < 4; ++i) { diff --git a/cocos/2d/CCLayer.h b/cocos/2d/CCLayer.h index 73f3192f55..1ed05c6c3c 100644 --- a/cocos/2d/CCLayer.h +++ b/cocos/2d/CCLayer.h @@ -37,7 +37,6 @@ THE SOFTWARE. #include "CCEventKeyboard.h" #include "renderer/CCCustomCommand.h" -#include "renderer/CCQuadCommand.h" NS_CC_BEGIN @@ -266,7 +265,7 @@ public: // // Overrides // - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void onDraw(); virtual void setContentSize(const Size & var) override; diff --git a/cocos/2d/CCMotionStreak.cpp b/cocos/2d/CCMotionStreak.cpp index 5bd4a49aa2..d7ef7c3b33 100644 --- a/cocos/2d/CCMotionStreak.cpp +++ b/cocos/2d/CCMotionStreak.cpp @@ -328,7 +328,7 @@ void MotionStreak::reset() void MotionStreak::onDraw() { getShaderProgram()->use(); - getShaderProgram()->setUniformsForBuiltins(_cachedMV); + getShaderProgram()->setUniformsForBuiltins(_modelViewTransform); GL::enableVertexAttribs(GL::VERTEX_ATTRIB_FLAG_POS_COLOR_TEX ); GL::blendFunc( _blendFunc.src, _blendFunc.dst ); @@ -352,16 +352,16 @@ void MotionStreak::onDraw() #endif // EMSCRIPTEN glDrawArrays(GL_TRIANGLE_STRIP, 0, (GLsizei)_nuPoints*2); + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, _nuPoints*2); } -void MotionStreak::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void MotionStreak::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if(_nuPoints <= 1) return; - kmGLGetMatrix(KM_GL_MODELVIEW,&_cachedMV); _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(MotionStreak::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } diff --git a/cocos/2d/CCMotionStreak.h b/cocos/2d/CCMotionStreak.h index 96d050a7d4..1993e8ab34 100644 --- a/cocos/2d/CCMotionStreak.h +++ b/cocos/2d/CCMotionStreak.h @@ -78,7 +78,7 @@ public: * @js NA * @lua NA */ - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; /** * @js NA * @lua NA @@ -102,19 +102,9 @@ public: virtual bool isOpacityModifyRGB() const override; protected: - kmMat4 _cachedMV; //renderer callback void onDraw(); - -protected: - /** - * @js ctor - */ MotionStreak(); - /** - * @js NA - * @lua NA - */ virtual ~MotionStreak(); /** initializes a motion streak with fade in seconds, minimum segments, stroke's width, color and texture filename */ diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 7dbfa93d47..2413d1fefd 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -92,6 +92,7 @@ Node::Node(void) , _useAdditionalTransform(false) , _transformDirty(true) , _inverseDirty(true) +, _transformUpdated(true) // children (lazy allocs) // lazy alloc , _localZOrder(0) @@ -193,7 +194,7 @@ void Node::setSkewX(float skewX) return; _skewX = skewX; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } float Node::getSkewY() const @@ -207,7 +208,7 @@ void Node::setSkewY(float skewY) return; _skewY = skewY; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } @@ -255,8 +256,8 @@ void Node::setRotation(float rotation) return; _rotationZ_X = _rotationZ_Y = rotation; - _transformDirty = _inverseDirty = true; - + _transformUpdated = _transformDirty = _inverseDirty = true; + #if CC_USE_PHYSICS if (_physicsBody) { @@ -277,7 +278,7 @@ void Node::setRotation3D(const Vertex3F& rotation) _rotationZ_X == rotation.z) return; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; _rotationX = rotation.x; _rotationY = rotation.y; @@ -307,7 +308,7 @@ void Node::setRotationSkewX(float rotationX) return; _rotationZ_X = rotationX; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } float Node::getRotationSkewY() const @@ -321,7 +322,7 @@ void Node::setRotationSkewY(float rotationY) return; _rotationZ_Y = rotationY; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } /// scale getter @@ -338,7 +339,7 @@ void Node::setScale(float scale) return; _scaleX = _scaleY = _scaleZ = scale; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } /// scaleX getter @@ -355,7 +356,7 @@ void Node::setScale(float scaleX,float scaleY) _scaleX = scaleX; _scaleY = scaleY; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } /// scaleX setter @@ -365,7 +366,7 @@ void Node::setScaleX(float scaleX) return; _scaleX = scaleX; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } /// scaleY getter @@ -381,7 +382,7 @@ void Node::setScaleZ(float scaleZ) return; _scaleZ = scaleZ; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } /// scaleY getter @@ -397,7 +398,7 @@ void Node::setScaleY(float scaleY) return; _scaleY = scaleY; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } @@ -414,8 +415,8 @@ void Node::setPosition(const Point& position) return; _position = position; - _transformDirty = _inverseDirty = true; - + _transformUpdated = _transformDirty = _inverseDirty = true; + #if CC_USE_PHYSICS if (_physicsBody) { @@ -480,7 +481,7 @@ void Node::setPositionZ(float positionZ) if (_positionZ == positionZ) return; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; _positionZ = positionZ; @@ -538,7 +539,7 @@ void Node::setAnchorPoint(const Point& point) { _anchorPoint = point; _anchorPointInPoints = Point(_contentSize.width * _anchorPoint.x, _contentSize.height * _anchorPoint.y ); - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } } @@ -555,7 +556,7 @@ void Node::setContentSize(const Size & size) _contentSize = size; _anchorPointInPoints = Point(_contentSize.width * _anchorPoint.x, _contentSize.height * _anchorPoint.y ); - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } } @@ -582,7 +583,7 @@ void Node::ignoreAnchorPointForPosition(bool newValue) if (newValue != _ignoreAnchorPointForPosition) { _ignoreAnchorPointForPosition = newValue; - _transformDirty = _inverseDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; } } @@ -906,7 +907,7 @@ void Node::draw() draw(renderer, _modelViewTransform, true); } -void Node::draw(Renderer* renderer, const kmMat4 &transform, bool transformDirty) +void Node::draw(Renderer* renderer, const kmMat4 &transform, bool transformUpdated) { } @@ -918,7 +919,7 @@ void Node::visit() visit(renderer, parentTransform, true); } -void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -926,9 +927,10 @@ void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentT return; } - bool dirty = _transformDirty || parentTransformDirty; + bool dirty = _transformUpdated || parentTransformUpdated; if(dirty) _modelViewTransform = this->transform(parentTransform); + _transformUpdated = false; // IMPORTANT: @@ -969,17 +971,10 @@ void Node::visit(Renderer* renderer, const kmMat4 &parentTransform, bool parentT kmGLPopMatrix(); } -void Node::transformAncestors() -{ - // remove me - CCASSERT(false, "no longer supported"); -} - kmMat4 Node::transform(const kmMat4& parentTransform) { - kmMat4 ret; - kmMat4 transfrom4x4 = this->getNodeToParentTransform(); - kmMat4Multiply(&ret, &parentTransform, &transfrom4x4); + kmMat4 ret = this->getNodeToParentTransform(); + kmMat4Multiply(&ret, &parentTransform, &ret); return ret; } @@ -1362,19 +1357,20 @@ void Node::setNodeToParentTransform(const kmMat4& transform) { _transform = transform; _transformDirty = false; + _transformUpdated = true; } void Node::setAdditionalTransform(const AffineTransform& additionalTransform) { CGAffineToGL(additionalTransform, _additionalTransform.mat); - _transformDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; _useAdditionalTransform = true; } void Node::setAdditionalTransform(const kmMat4& additionalTransform) { _additionalTransform = additionalTransform; - _transformDirty = true; + _transformUpdated = _transformDirty = _inverseDirty = true; _useAdditionalTransform = true; } diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index e9b04215d2..312615ef5c 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -991,13 +991,13 @@ public: * AND YOU SHOULD NOT DISABLE THEM AFTER DRAWING YOUR NODE * But if you enable any other GL state, you should disable it after drawing your node. */ - virtual void draw(Renderer *renderer, const kmMat4& transform, bool transformDirty); + virtual void draw(Renderer *renderer, const kmMat4& transform, bool transformUpdated); virtual void draw() final; /** * Visits this node's children and draw them recursively. */ - virtual void visit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty); + virtual void visit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformUpdated); virtual void visit() final; @@ -1253,16 +1253,6 @@ public: /// @{ /// @name Transformations - /** - * Performs OpenGL view-matrix transformation based on position, scale, rotation and other attributes. - */ - kmMat4 transform(const kmMat4 &parentTransform); - /** - * Performs OpenGL view-matrix transformation of it's ancestors. - * Generally the ancestors are already transformed, but in certain cases (eg: attaching a FBO) - * It's necessary to transform the ancestors again. - */ - void transformAncestors(); /** * Calls children's updateTransform() method recursively. * @@ -1313,7 +1303,7 @@ public: virtual AffineTransform getWorldToNodeAffineTransform() const; - /** @deprecated Use worldToNodeTransform() instead */ + /** @deprecated Use getWorldToNodeTransform() instead */ CC_DEPRECATED_ATTRIBUTE inline virtual AffineTransform worldToNodeTransform() const { return getWorldToNodeAffineTransform(); } /// @} end of Transformations @@ -1404,8 +1394,8 @@ public: spriteB->setAdditionalTransform(t); @endcode */ - void setAdditionalTransform(const AffineTransform& additionalTransform); void setAdditionalTransform(const kmMat4& additionalTransform); + void setAdditionalTransform(const AffineTransform& additionalTransform); /// @} end of Coordinate Converters @@ -1481,7 +1471,9 @@ protected: /// Convert cocos2d coordinates to UI windows coordinate. Point convertToWindowSpace(const Point& nodePoint) const; - + + kmMat4 transform(const kmMat4 &parentTransform); + virtual void updateCascadeOpacity(); virtual void disableCascadeOpacity(); virtual void updateCascadeColor(); @@ -1506,32 +1498,32 @@ protected: float _skewX; ///< skew angle on x-axis float _skewY; ///< skew angle on y-axis - Point _anchorPointInPoints; ///< anchor point in points - Point _anchorPoint; ///< anchor point normalized (NOT in points) + Point _anchorPointInPoints; ///< anchor point in points + Point _anchorPoint; ///< anchor point normalized (NOT in points) - Size _contentSize; ///< untransformed size of the node + Size _contentSize; ///< untransformed size of the node kmMat4 _modelViewTransform; ///< ModelView transform of the Node. // "cache" variables are allowed to be mutable + mutable kmMat4 _transform; ///< transform + mutable bool _transformDirty; ///< transform dirty flag + mutable kmMat4 _inverse; ///< inverse transform + mutable bool _inverseDirty; ///< inverse transform dirty flag mutable kmMat4 _additionalTransform; ///< transform - mutable kmMat4 _transform; ///< transform - mutable kmMat4 _inverse; ///< inverse transform bool _useAdditionalTransform; ///< The flag to check whether the additional transform is dirty - mutable bool _transformDirty; ///< transform dirty flag - mutable bool _inverseDirty; ///< inverse transform dirty flag + bool _transformUpdated; ///< Whether or not the Transform object was updated since the last frame + int _localZOrder; ///< Local order (relative to its siblings) used to sort the node + float _globalZOrder; ///< Global order used to sort the node - int _localZOrder; ///< Local order (relative to its siblings) used to sort the node - float _globalZOrder; ///< Global order used to sort the node - - Vector _children; ///< array of children nodes + Vector _children; ///< array of children nodes Node *_parent; ///< weak reference to parent node - int _tag; ///< a tag. Can be any number you assigned just to identify this node + int _tag; ///< a tag. Can be any number you assigned just to identify this node - void *_userData; ///< A user assingned void pointer, Can be point to any cpp object - Ref *_userObject; ///< A user assigned Object + void *_userData; ///< A user assingned void pointer, Can be point to any cpp object + Ref *_userObject; ///< A user assigned Object GLProgram *_shaderProgram; ///< OpenGL shader @@ -1543,9 +1535,9 @@ protected: EventDispatcher* _eventDispatcher; ///< event dispatcher used to dispatch all kinds of events - bool _running; ///< is running + bool _running; ///< is running - bool _visible; ///< is this node visible + bool _visible; ///< is this node visible bool _ignoreAnchorPointForPosition; ///< true if the Anchor Point will be (0,0) when you position the Node, false otherwise. ///< Used by Layer and Scene. diff --git a/cocos/2d/CCNodeGrid.cpp b/cocos/2d/CCNodeGrid.cpp index a94bfcecb0..66585a3c61 100644 --- a/cocos/2d/CCNodeGrid.cpp +++ b/cocos/2d/CCNodeGrid.cpp @@ -82,7 +82,7 @@ void NodeGrid::onGridEndDraw() } } -void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -94,9 +94,10 @@ void NodeGrid::visit(Renderer *renderer, const kmMat4 &parentTransform, bool par renderer->addCommand(&_groupCommand); renderer->pushGroup(_groupCommand.getRenderQueueID()); - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = this->transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, diff --git a/cocos/2d/CCNodeGrid.h b/cocos/2d/CCNodeGrid.h index 45c165b1e0..626b2d43e8 100644 --- a/cocos/2d/CCNodeGrid.h +++ b/cocos/2d/CCNodeGrid.h @@ -55,7 +55,7 @@ public: void setTarget(Node *target); // overrides - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; protected: NodeGrid(); diff --git a/cocos/2d/CCParallaxNode.cpp b/cocos/2d/CCParallaxNode.cpp index 85968330d6..19b3b6b96d 100644 --- a/cocos/2d/CCParallaxNode.cpp +++ b/cocos/2d/CCParallaxNode.cpp @@ -145,7 +145,7 @@ The positions are updated at visit because: - using a timer is not guaranteed that it will called after all the positions were updated - overriding "draw" will only precise if the children have a z > 0 */ -void ParallaxNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void ParallaxNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // Point pos = position_; // Point pos = [self convertToWorldSpace:Point::ZERO]; @@ -161,7 +161,7 @@ void ParallaxNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool } _lastPosition = pos; } - Node::visit(renderer, parentTransform, parentTransformDirty); + Node::visit(renderer, parentTransform, parentTransformUpdated); } NS_CC_END diff --git a/cocos/2d/CCParallaxNode.h b/cocos/2d/CCParallaxNode.h index 26956c5a67..7f74bba10c 100644 --- a/cocos/2d/CCParallaxNode.h +++ b/cocos/2d/CCParallaxNode.h @@ -67,7 +67,7 @@ public: virtual void addChild(Node * child, int zOrder, int tag) override; virtual void removeChild(Node* child, bool cleanup) override; virtual void removeAllChildrenWithCleanup(bool cleanup) override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; protected: /** Adds a child to the container with a z-order, a parallax ratio and a position offset diff --git a/cocos/2d/CCParticleBatchNode.cpp b/cocos/2d/CCParticleBatchNode.cpp index 7f68da628b..4fa0e67f0a 100644 --- a/cocos/2d/CCParticleBatchNode.cpp +++ b/cocos/2d/CCParticleBatchNode.cpp @@ -120,7 +120,7 @@ bool ParticleBatchNode::initWithFile(const std::string& fileImage, int capacity) // override visit. // Don't call visit on it's children -void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // CAREFUL: // This visit is almost identical to Node#visit @@ -134,9 +134,10 @@ void ParticleBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, return; } - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, @@ -379,7 +380,7 @@ void ParticleBatchNode::removeAllChildrenWithCleanup(bool doCleanup) _textureAtlas->removeAllQuads(); } -void ParticleBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ParticleBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { CC_PROFILER_START("CCParticleBatchNode - draw"); @@ -394,7 +395,7 @@ void ParticleBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool t _blendFunc, _textureAtlas, _modelViewTransform); - Director::getInstance()->getRenderer()->addCommand(&_batchCommand); + renderer->addCommand(&_batchCommand); CC_PROFILER_STOP("CCParticleBatchNode - draw"); } diff --git a/cocos/2d/CCParticleBatchNode.h b/cocos/2d/CCParticleBatchNode.h index 9623c74dee..17c889f818 100644 --- a/cocos/2d/CCParticleBatchNode.h +++ b/cocos/2d/CCParticleBatchNode.h @@ -97,13 +97,13 @@ public: inline void setTextureAtlas(TextureAtlas* atlas) { _textureAtlas = atlas; }; // Overrides - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; virtual void removeChild(Node* child, bool cleanup) override; virtual void reorderChild(Node * child, int zOrder) override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual Texture2D* getTexture(void) const override; virtual void setTexture(Texture2D *texture) override; /** diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index afa62e20e9..1f11b4c4d6 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -72,7 +72,7 @@ bool ParticleSystemQuad::initWithTotalParticles(int numberOfParticles) setupVBO(); } - setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); + setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP)); #if CC_ENABLE_CACHE_TEXTURE_DATA // Need to listen the event only when not use batchnode, because it will use VBO @@ -358,16 +358,14 @@ void ParticleSystemQuad::postStep() } // overriding draw method -void ParticleSystemQuad::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ParticleSystemQuad::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { CCASSERT( _particleIdx == _particleCount, "Abnormal error in particle quad"); //quad command if(_particleIdx > 0) { - auto shader = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP); - - _quadCommand.init(_globalZOrder, _texture->getName(), shader, _blendFunc, _quads, _particleIdx, _modelViewTransform); - Director::getInstance()->getRenderer()->addCommand(&_quadCommand); + _quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, _quads, _particleIdx, _modelViewTransform); + renderer->addCommand(&_quadCommand); } } diff --git a/cocos/2d/CCParticleSystemQuad.h b/cocos/2d/CCParticleSystemQuad.h index db858ca1e4..3e48129ac0 100644 --- a/cocos/2d/CCParticleSystemQuad.h +++ b/cocos/2d/CCParticleSystemQuad.h @@ -104,7 +104,7 @@ public: * @js NA * @lua NA */ - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; /** * @js NA diff --git a/cocos/2d/CCProgressTimer.cpp b/cocos/2d/CCProgressTimer.cpp index 4b8097f3b5..9e47e78dbb 100644 --- a/cocos/2d/CCProgressTimer.cpp +++ b/cocos/2d/CCProgressTimer.cpp @@ -550,14 +550,14 @@ void ProgressTimer::onDraw() } } -void ProgressTimer::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ProgressTimer::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if( ! _vertexData || ! _sprite) return; _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ProgressTimer::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } diff --git a/cocos/2d/CCProgressTimer.h b/cocos/2d/CCProgressTimer.h index f19c08367f..2013453e84 100644 --- a/cocos/2d/CCProgressTimer.h +++ b/cocos/2d/CCProgressTimer.h @@ -111,7 +111,7 @@ public: inline Point getBarChangeRate() const { return _barChangeRate; } // Overrides - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void setAnchorPoint(const Point& anchorPoint) override; virtual void setColor(const Color3B &color) override; virtual const Color3B& getColor() const override; diff --git a/cocos/2d/CCRenderTexture.cpp b/cocos/2d/CCRenderTexture.cpp index 91eaedae55..f039bd5973 100644 --- a/cocos/2d/CCRenderTexture.cpp +++ b/cocos/2d/CCRenderTexture.cpp @@ -361,7 +361,7 @@ void RenderTexture::clearStencil(int stencilValue) glClearStencil(stencilClearValue); } -void RenderTexture::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void RenderTexture::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // override visit. // Don't call visit on its children @@ -370,9 +370,10 @@ void RenderTexture::visit(Renderer *renderer, const kmMat4 &parentTransform, boo return; } - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, @@ -617,7 +618,7 @@ void RenderTexture::onClearDepth() glClearDepth(depthClearValue); } -void RenderTexture::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void RenderTexture::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if (_autoDraw) { @@ -635,7 +636,7 @@ void RenderTexture::draw(Renderer *renderer, const kmMat4 &transform, bool trans for(const auto &child: _children) { if (child != _sprite) - child->visit(renderer, transform, transformDirty); + child->visit(renderer, transform, transformUpdated); } //End will pop the current render group diff --git a/cocos/2d/CCRenderTexture.h b/cocos/2d/CCRenderTexture.h index 5ccd0ae25f..2e5df94754 100644 --- a/cocos/2d/CCRenderTexture.h +++ b/cocos/2d/CCRenderTexture.h @@ -154,8 +154,8 @@ public: }; // Overrides - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; public: // XXX should be procted. diff --git a/cocos/2d/CCSprite.cpp b/cocos/2d/CCSprite.cpp index c39b202a7b..e61912d4ae 100644 --- a/cocos/2d/CCSprite.cpp +++ b/cocos/2d/CCSprite.cpp @@ -277,6 +277,7 @@ bool Sprite::initWithTexture(Texture2D *texture, const Rect& rect, bool rotated) Sprite::Sprite(void) : _shouldBeHidden(false) , _texture(nullptr) +, _insideBounds(true) { } @@ -586,16 +587,19 @@ void Sprite::updateTransform(void) // draw -void Sprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Sprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - if(isInsideBounds()) + // Don't do calculate the culling if the transform was not updated + _insideBounds = transformUpdated ? isInsideBounds() : _insideBounds; + + if(_insideBounds) { - _quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, &_quad, 1, _modelViewTransform); - Director::getInstance()->getRenderer()->addCommand(&_quadCommand); + _quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, &_quad, 1, transform); + renderer->addCommand(&_quadCommand); #if CC_SPRITE_DEBUG_DRAW _customDebugDrawCommand.init(_globalZOrder); _customDebugDrawCommand.func = CC_CALLBACK_0(Sprite::drawDebugData, this); - Director::getInstance()->getRenderer()->addCommand(&_customDebugDrawCommand); + renderer->addCommand(&_customDebugDrawCommand); #endif //CC_SPRITE_DEBUG_DRAW } } diff --git a/cocos/2d/CCSprite.h b/cocos/2d/CCSprite.h index f79abdb9db..9e8c8c4bdc 100644 --- a/cocos/2d/CCSprite.h +++ b/cocos/2d/CCSprite.h @@ -424,7 +424,7 @@ public: virtual void setAnchorPoint(const Point& anchor) override; virtual void ignoreAnchorPointForPosition(bool value) override; virtual void setVisible(bool bVisible) override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void setOpacityModifyRGB(bool modify) override; virtual bool isOpacityModifyRGB(void) const override; /// @} @@ -573,6 +573,8 @@ protected: bool _flippedX; /// Whether the sprite is flipped horizontally or not bool _flippedY; /// Whether the sprite is flipped vertically or not + bool _insideBounds; /// whether or not the sprite was inside bounds the previous frame + private: CC_DISALLOW_COPY_AND_ASSIGN(Sprite); }; diff --git a/cocos/2d/CCSpriteBatchNode.cpp b/cocos/2d/CCSpriteBatchNode.cpp index f5d38a732b..aae535904a 100644 --- a/cocos/2d/CCSpriteBatchNode.cpp +++ b/cocos/2d/CCSpriteBatchNode.cpp @@ -131,7 +131,7 @@ SpriteBatchNode::~SpriteBatchNode() // override visit // don't call visit on it's children -void SpriteBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void SpriteBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { CC_PROFILER_START_CATEGORY(kProfilerCategoryBatchSprite, "CCSpriteBatchNode - visit"); @@ -149,9 +149,10 @@ void SpriteBatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, b sortAllChildren(); - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, @@ -352,7 +353,7 @@ void SpriteBatchNode::reorderBatch(bool reorder) _reorderChildDirty=reorder; } -void SpriteBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void SpriteBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { // Optimization: Fast Dispatch if( _textureAtlas->getTotalQuads() == 0 ) @@ -368,8 +369,8 @@ void SpriteBatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool tra _shaderProgram, _blendFunc, _textureAtlas, - _modelViewTransform); - Director::getInstance()->getRenderer()->addCommand(&_batchCommand); + transform); + renderer->addCommand(&_batchCommand); } void SpriteBatchNode::increaseAtlasCapacity(void) diff --git a/cocos/2d/CCSpriteBatchNode.h b/cocos/2d/CCSpriteBatchNode.h index 24f4f90c60..d95fcfcaf4 100644 --- a/cocos/2d/CCSpriteBatchNode.h +++ b/cocos/2d/CCSpriteBatchNode.h @@ -155,7 +155,7 @@ public: */ virtual const BlendFunc& getBlendFunc() const override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; @@ -164,7 +164,7 @@ public: virtual void removeChild(Node *child, bool cleanup) override; virtual void removeAllChildrenWithCleanup(bool cleanup) override; virtual void sortAllChildren() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string getDescription() const override; /** Inserts a quad at a certain index into the texture atlas. The Sprite won't be added into the children array. diff --git a/cocos/2d/CCTextFieldTTF.cpp b/cocos/2d/CCTextFieldTTF.cpp index 8b7c06cecb..4911187604 100644 --- a/cocos/2d/CCTextFieldTTF.cpp +++ b/cocos/2d/CCTextFieldTTF.cpp @@ -242,7 +242,7 @@ const std::string& TextFieldTTF::getContentText() return _inputText; } -void TextFieldTTF::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TextFieldTTF::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if (_delegate && _delegate->onDraw(this)) { @@ -250,14 +250,14 @@ void TextFieldTTF::draw(Renderer *renderer, const kmMat4 &transform, bool transf } if (_inputText.length()) { - LabelTTF::draw(renderer, transform, transformDirty); + LabelTTF::draw(renderer, transform, transformUpdated); return; } // draw placeholder Color3B color = getColor(); setColor(_colorSpaceHolder); - LabelTTF::draw(renderer, transform, transformDirty); + LabelTTF::draw(renderer, transform, transformUpdated); setColor(color); } diff --git a/cocos/2d/CCTextFieldTTF.h b/cocos/2d/CCTextFieldTTF.h index 6aa6ffd2a3..9019cf95ee 100644 --- a/cocos/2d/CCTextFieldTTF.h +++ b/cocos/2d/CCTextFieldTTF.h @@ -173,7 +173,7 @@ protected: bool _secureTextEntry; protected: - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; ////////////////////////////////////////////////////////////////////////// // IMEDelegate interface diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index 0dac8352c8..7344a28306 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -97,16 +97,16 @@ void TransitionScene::sceneOrder() _isInSceneOnTop = true; } -void TransitionScene::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TransitionScene::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Scene::draw(renderer, transform, transformDirty); + Scene::draw(renderer, transform, transformUpdated); if( _isInSceneOnTop ) { - _outScene->visit(renderer, transform, transformDirty); - _inScene->visit(renderer, transform, transformDirty); + _outScene->visit(renderer, transform, transformUpdated); + _inScene->visit(renderer, transform, transformUpdated); } else { - _inScene->visit(renderer, transform, transformDirty); - _outScene->visit(renderer, transform, transformDirty); + _inScene->visit(renderer, transform, transformUpdated); + _outScene->visit(renderer, transform, transformUpdated); } } @@ -1258,7 +1258,7 @@ TransitionCrossFade* TransitionCrossFade::create(float t, Scene* scene) return nullptr; } -void TransitionCrossFade::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TransitionCrossFade::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { // override draw since both scenes (textures) are rendered in 1 scene } @@ -1407,19 +1407,19 @@ void TransitionTurnOffTiles::onExit() TransitionScene::onExit(); } -void TransitionTurnOffTiles::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TransitionTurnOffTiles::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Scene::draw(renderer, transform, transformDirty); + Scene::draw(renderer, transform, transformUpdated); if( _isInSceneOnTop ) { - _outSceneProxy->visit(renderer, transform, transformDirty); - _inScene->visit(renderer, transform, transformDirty); + _outSceneProxy->visit(renderer, transform, transformUpdated); + _inScene->visit(renderer, transform, transformUpdated); } else { - _inScene->visit(renderer, transform, transformDirty); - _outSceneProxy->visit(renderer, transform, transformDirty); + _inScene->visit(renderer, transform, transformUpdated); + _outSceneProxy->visit(renderer, transform, transformUpdated); } } @@ -1487,10 +1487,10 @@ void TransitionSplitCols::switchTargetToInscene() _gridProxy->setTarget(_inScene); } -void TransitionSplitCols::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TransitionSplitCols::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Scene::draw(renderer, transform, transformDirty); - _gridProxy->visit(renderer, transform, transformDirty); + Scene::draw(renderer, transform, transformUpdated); + _gridProxy->visit(renderer, transform, transformUpdated); } void TransitionSplitCols::onExit() @@ -1603,19 +1603,19 @@ void TransitionFadeTR::onExit() TransitionScene::onExit(); } -void TransitionFadeTR::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TransitionFadeTR::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Scene::draw(renderer, transform, transformDirty); + Scene::draw(renderer, transform, transformUpdated); if( _isInSceneOnTop ) { - _outSceneProxy->visit(renderer, transform, transformDirty); - _inScene->visit(renderer, transform, transformDirty); + _outSceneProxy->visit(renderer, transform, transformUpdated); + _inScene->visit(renderer, transform, transformUpdated); } else { - _inScene->visit(renderer, transform, transformDirty); - _outSceneProxy->visit(renderer, transform, transformDirty); + _inScene->visit(renderer, transform, transformUpdated); + _outSceneProxy->visit(renderer, transform, transformUpdated); } } diff --git a/cocos/2d/CCTransition.h b/cocos/2d/CCTransition.h index 29989f819b..b98eb7c360 100644 --- a/cocos/2d/CCTransition.h +++ b/cocos/2d/CCTransition.h @@ -91,7 +91,7 @@ public: // // Overrides // - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void onEnter() override; virtual void onExit() override; virtual void cleanup() override; @@ -609,7 +609,7 @@ public : * @js NA * @lua NA */ - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; /** * @js NA * @lua NA @@ -647,7 +647,7 @@ public : virtual void onEnter() override; virtual void onExit() override; virtual ActionInterval * easeActionWithAction(ActionInterval * action) override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: TransitionTurnOffTiles(); @@ -680,7 +680,7 @@ public: virtual void onEnter() override; virtual ActionInterval * easeActionWithAction(ActionInterval * action) override; virtual void onExit() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: TransitionSplitCols(); virtual ~TransitionSplitCols(); @@ -731,7 +731,7 @@ public: virtual void onEnter() override; virtual ActionInterval* easeActionWithAction(ActionInterval * action) override; virtual void onExit() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: TransitionFadeTR(); virtual ~TransitionFadeTR(); diff --git a/cocos/2d/CCTransitionPageTurn.cpp b/cocos/2d/CCTransitionPageTurn.cpp index d7780ae8ce..9736dcda21 100644 --- a/cocos/2d/CCTransitionPageTurn.cpp +++ b/cocos/2d/CCTransitionPageTurn.cpp @@ -92,31 +92,31 @@ void TransitionPageTurn::onDisablePolygonOffset() glPolygonOffset(0, 0); } -void TransitionPageTurn::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TransitionPageTurn::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Scene::draw(renderer, transform, transformDirty); + Scene::draw(renderer, transform, transformUpdated); if( _isInSceneOnTop ) { - _outSceneProxy->visit(renderer, transform, transformDirty); + _outSceneProxy->visit(renderer, transform, transformUpdated); _enableOffsetCmd.init(_globalZOrder); _enableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onEnablePolygonOffset, this); - Director::getInstance()->getRenderer()->addCommand(&_enableOffsetCmd); - _inSceneProxy->visit(renderer, transform, transformDirty); + renderer->addCommand(&_enableOffsetCmd); + _inSceneProxy->visit(renderer, transform, transformUpdated); _disableOffsetCmd.init(_globalZOrder); _disableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onDisablePolygonOffset, this); - Director::getInstance()->getRenderer()->addCommand(&_disableOffsetCmd); + renderer->addCommand(&_disableOffsetCmd); } else { - _inSceneProxy->visit(renderer, transform, transformDirty); + _inSceneProxy->visit(renderer, transform, transformUpdated); _enableOffsetCmd.init(_globalZOrder); _enableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onEnablePolygonOffset, this); - Director::getInstance()->getRenderer()->addCommand(&_enableOffsetCmd); + renderer->addCommand(&_enableOffsetCmd); - _outSceneProxy->visit(renderer, transform, transformDirty); + _outSceneProxy->visit(renderer, transform, transformUpdated); _disableOffsetCmd.init(_globalZOrder); _disableOffsetCmd.func = CC_CALLBACK_0(TransitionPageTurn::onDisablePolygonOffset, this); - Director::getInstance()->getRenderer()->addCommand(&_disableOffsetCmd); + renderer->addCommand(&_disableOffsetCmd); } } diff --git a/cocos/2d/CCTransitionPageTurn.h b/cocos/2d/CCTransitionPageTurn.h index f65a66f2cd..ebbffa4d06 100644 --- a/cocos/2d/CCTransitionPageTurn.h +++ b/cocos/2d/CCTransitionPageTurn.h @@ -72,7 +72,7 @@ public: // // Overrides // - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; /** * Creates a base transition with duration and incoming scene. diff --git a/cocos/editor-support/cocostudio/CCArmature.cpp b/cocos/editor-support/cocostudio/CCArmature.cpp index 3599e9d867..5c417ee316 100644 --- a/cocos/editor-support/cocostudio/CCArmature.cpp +++ b/cocos/editor-support/cocostudio/CCArmature.cpp @@ -29,7 +29,6 @@ THE SOFTWARE. #include "cocostudio/CCDatas.h" #include "cocostudio/CCSkin.h" -#include "renderer/CCQuadCommand.h" #include "renderer/CCRenderer.h" #include "renderer/CCGroupCommand.h" #include "CCShaderCache.h" @@ -378,7 +377,7 @@ void Armature::update(float dt) _armatureTransformDirty = false; } -void Armature::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Armature::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if (_parentBone == nullptr && _batchNode == nullptr) { @@ -408,17 +407,17 @@ void Armature::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool t { skin->setBlendFunc(bone->getBlendFunc()); } - skin->draw(renderer, transform, transformDirty); + skin->draw(renderer, transform, transformUpdated); } break; case CS_DISPLAY_ARMATURE: { - node->draw(renderer, transform, transformDirty); + node->draw(renderer, transform, transformUpdated); } break; default: { - node->visit(renderer, transform, transformDirty); + node->visit(renderer, transform, transformUpdated); CC_NODE_DRAW_SETUP(); } break; @@ -426,7 +425,7 @@ void Armature::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool t } else if(Node *node = dynamic_cast(object)) { - node->visit(renderer, transform, transformDirty); + node->visit(renderer, transform, transformUpdated); CC_NODE_DRAW_SETUP(); } } @@ -445,7 +444,7 @@ void Armature::onExit() } -void Armature::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Armature::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -453,9 +452,10 @@ void Armature::visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, return; } - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, diff --git a/cocos/editor-support/cocostudio/CCArmature.h b/cocos/editor-support/cocostudio/CCArmature.h index ae5d9e1031..b951aa7b1f 100644 --- a/cocos/editor-support/cocostudio/CCArmature.h +++ b/cocos/editor-support/cocostudio/CCArmature.h @@ -156,8 +156,8 @@ public: * @js NA * @lua NA */ - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; - virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void update(float dt) override; virtual void onEnter() override; diff --git a/cocos/editor-support/cocostudio/CCBatchNode.cpp b/cocos/editor-support/cocostudio/CCBatchNode.cpp index 58841cb695..c8aa941a3b 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.cpp +++ b/cocos/editor-support/cocostudio/CCBatchNode.cpp @@ -101,7 +101,7 @@ void BatchNode::removeChild(Node* child, bool cleanup) Node::removeChild(child, cleanup); } -void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // quick return if not visible. children won't be drawn. if (!_visible) @@ -109,9 +109,10 @@ void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool pa return; } - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, @@ -128,7 +129,7 @@ void BatchNode::visit(Renderer *renderer, const kmMat4 &parentTransform, bool pa kmGLPopMatrix(); } -void BatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void BatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if (_children.empty()) { @@ -149,14 +150,14 @@ void BatchNode::draw(Renderer *renderer, const kmMat4 &transform, bool transform pushed = true; } - armature->visit(renderer, transform, transformDirty); + armature->visit(renderer, transform, transformUpdated); } else { - Director::getInstance()->getRenderer()->popGroup(); + renderer->popGroup(); pushed = false; - ((Node *)object)->visit(renderer, transform, transformDirty); + ((Node *)object)->visit(renderer, transform, transformUpdated); } } } diff --git a/cocos/editor-support/cocostudio/CCBatchNode.h b/cocos/editor-support/cocostudio/CCBatchNode.h index d08f134283..56acaf0f15 100644 --- a/cocos/editor-support/cocostudio/CCBatchNode.h +++ b/cocos/editor-support/cocostudio/CCBatchNode.h @@ -56,8 +56,8 @@ public: virtual void addChild(cocos2d::Node *pChild, int zOrder) override; virtual void addChild(cocos2d::Node *pChild, int zOrder, int tag) override; virtual void removeChild(cocos2d::Node* child, bool cleanup) override; - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; - virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: void generateGroupCommand(); diff --git a/cocos/editor-support/cocostudio/CCSkin.cpp b/cocos/editor-support/cocostudio/CCSkin.cpp index f6656cee62..4d153f5baf 100644 --- a/cocos/editor-support/cocostudio/CCSkin.cpp +++ b/cocos/editor-support/cocostudio/CCSkin.cpp @@ -219,14 +219,14 @@ kmMat4 Skin::getNodeToWorldTransformAR() const return TransformConcat( _bone->getArmature()->getNodeToWorldTransform(),displayTransform); } -void Skin::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Skin::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { kmMat4 mv; kmGLGetMatrix(KM_GL_MODELVIEW, &mv); //TODO implement z order _quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, &_quad, 1, mv); - Director::getInstance()->getRenderer()->addCommand(&_quadCommand); + renderer->addCommand(&_quadCommand); } void Skin::setBone(Bone *bone) diff --git a/cocos/editor-support/cocostudio/CCSkin.h b/cocos/editor-support/cocostudio/CCSkin.h index 29583892b6..33b1a24915 100644 --- a/cocos/editor-support/cocostudio/CCSkin.h +++ b/cocos/editor-support/cocostudio/CCSkin.h @@ -54,7 +54,7 @@ public: kmMat4 getNodeToWorldTransform() const override; kmMat4 getNodeToWorldTransformAR() const; - virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; /** * @js NA diff --git a/cocos/editor-support/spine/CCSkeleton.cpp b/cocos/editor-support/spine/CCSkeleton.cpp index 5089f374f4..1b23ac971c 100644 --- a/cocos/editor-support/spine/CCSkeleton.cpp +++ b/cocos/editor-support/spine/CCSkeleton.cpp @@ -125,12 +125,12 @@ void Skeleton::update (float deltaTime) { spSkeleton_update(skeleton, deltaTime * timeScale); } -void Skeleton::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Skeleton::draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Skeleton::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void Skeleton::onDraw () diff --git a/cocos/editor-support/spine/CCSkeleton.h b/cocos/editor-support/spine/CCSkeleton.h index 18bdd50328..fa81d1bfa6 100644 --- a/cocos/editor-support/spine/CCSkeleton.h +++ b/cocos/editor-support/spine/CCSkeleton.h @@ -67,7 +67,7 @@ public: virtual ~Skeleton (); virtual void update (float deltaTime) override; - virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void onDraw(); void onEnter() override; void onExit() override; diff --git a/cocos/gui/UILayout.cpp b/cocos/gui/UILayout.cpp index e33742808c..3a13abc41e 100644 --- a/cocos/gui/UILayout.cpp +++ b/cocos/gui/UILayout.cpp @@ -167,7 +167,7 @@ bool Layout::hitTest(const Point &pt) return false; } -void Layout::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Layout::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { if (!_enabled) { @@ -178,10 +178,10 @@ void Layout::visit(Renderer *renderer, const kmMat4 &parentTransform, bool paren switch (_clippingType) { case LAYOUT_CLIPPING_STENCIL: - stencilClippingVisit(renderer, parentTransform, parentTransformDirty); + stencilClippingVisit(renderer, parentTransform, parentTransformUpdated); break; case LAYOUT_CLIPPING_SCISSOR: - scissorClippingVisit(renderer, parentTransform, parentTransformDirty); + scissorClippingVisit(renderer, parentTransform, parentTransformUpdated); break; default: break; @@ -189,7 +189,7 @@ void Layout::visit(Renderer *renderer, const kmMat4 &parentTransform, bool paren } else { - Node::visit(renderer, parentTransform, parentTransformDirty); + Node::visit(renderer, parentTransform, parentTransformUpdated); } } @@ -199,14 +199,15 @@ void Layout::sortAllChildren() doLayout(); } -void Layout::stencilClippingVisit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Layout::stencilClippingVisit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { if(!_visible) return; - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, @@ -339,13 +340,13 @@ void Layout::onAfterVisitScissor() glDisable(GL_SCISSOR_TEST); } -void Layout::scissorClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty) +void Layout::scissorClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformUpdated) { _beforeVisitCmdScissor.init(_globalZOrder); _beforeVisitCmdScissor.func = CC_CALLBACK_0(Layout::onBeforeVisitScissor, this); renderer->addCommand(&_beforeVisitCmdScissor); - Node::visit(renderer, parentTransform, parentTransformDirty); + Node::visit(renderer, parentTransform, parentTransformUpdated); _afterVisitCmdScissor.init(_globalZOrder); _afterVisitCmdScissor.func = CC_CALLBACK_0(Layout::onAfterVisitScissor, this); diff --git a/cocos/gui/UILayout.h b/cocos/gui/UILayout.h index 48eeff5870..67b9006c8f 100644 --- a/cocos/gui/UILayout.h +++ b/cocos/gui/UILayout.h @@ -209,7 +209,7 @@ public: */ virtual void addChild(Node* child, int zOrder, int tag) override; - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; virtual void sortAllChildren() override; @@ -234,8 +234,8 @@ protected: virtual void copySpecialProperties(Widget* model) override; virtual void copyClonedWidgetChildren(Widget* model) override; - void stencilClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty); - void scissorClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformDirty); + void stencilClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformUpdated); + void scissorClippingVisit(Renderer *renderer, const kmMat4& parentTransform, bool parentTransformUpdated); void setStencilClippingSize(const Size& size); const Rect& getClippingRect(); diff --git a/cocos/gui/UIWidget.cpp b/cocos/gui/UIWidget.cpp index 211ccb48c5..7ecfe2f93a 100644 --- a/cocos/gui/UIWidget.cpp +++ b/cocos/gui/UIWidget.cpp @@ -108,11 +108,11 @@ void Widget::onExit() Node::onExit(); } -void Widget::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Widget::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { if (_enabled) { - Node::visit(renderer, parentTransform, parentTransformDirty); + Node::visit(renderer, parentTransform, parentTransformUpdated); } } diff --git a/cocos/gui/UIWidget.h b/cocos/gui/UIWidget.h index 9d1f925afa..3cdd3b3f13 100644 --- a/cocos/gui/UIWidget.h +++ b/cocos/gui/UIWidget.h @@ -331,7 +331,7 @@ public: virtual void removeAllNodes(); - virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(cocos2d::Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; /** * Sets the touch event target/selector of the menu item diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp index b25ea9bfac..01f9e1a05b 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.cpp @@ -769,14 +769,14 @@ void Scale9Sprite::setInsetBottom(float insetBottom) this->updateCapInset(); } -void Scale9Sprite::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void Scale9Sprite::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { if(this->_positionsAreDirty) { this->updatePositions(); this->_positionsAreDirty = false; } - Node::visit(renderer, parentTransform, parentTransformDirty); + Node::visit(renderer, parentTransform, parentTransformUpdated); } void Scale9Sprite::setColor(const Color3B& color) diff --git a/extensions/GUI/CCControlExtension/CCScale9Sprite.h b/extensions/GUI/CCControlExtension/CCScale9Sprite.h index c66949f515..6c2ee432bd 100644 --- a/extensions/GUI/CCControlExtension/CCScale9Sprite.h +++ b/extensions/GUI/CCControlExtension/CCScale9Sprite.h @@ -261,7 +261,7 @@ public: * @js NA * @lua NA */ - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; virtual void setOpacityModifyRGB(bool bValue) override; virtual bool isOpacityModifyRGB(void) const override; virtual void setOpacity(GLubyte opacity) override; diff --git a/extensions/GUI/CCEditBox/CCEditBox.cpp b/extensions/GUI/CCEditBox/CCEditBox.cpp index 01df63ace1..479f28b905 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.cpp +++ b/extensions/GUI/CCEditBox/CCEditBox.cpp @@ -316,9 +316,9 @@ void EditBox::setAnchorPoint(const Point& anchorPoint) } } -void EditBox::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void EditBox::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { - ControlButton::visit(renderer, parentTransform, parentTransformDirty); + ControlButton::visit(renderer, parentTransform, parentTransformUpdated); if (_editBoxImpl != NULL) { _editBoxImpl->visit(); diff --git a/extensions/GUI/CCEditBox/CCEditBox.h b/extensions/GUI/CCEditBox/CCEditBox.h index eb05e7a1a7..90b962d516 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.h +++ b/extensions/GUI/CCEditBox/CCEditBox.h @@ -379,7 +379,7 @@ public: * @js NA * @lua NA */ - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; /** * @js NA * @lua NA diff --git a/extensions/GUI/CCScrollView/CCScrollView.cpp b/extensions/GUI/CCScrollView/CCScrollView.cpp index f681ba2339..e858b36cdf 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.cpp +++ b/extensions/GUI/CCScrollView/CCScrollView.cpp @@ -552,7 +552,7 @@ void ScrollView::onAfterDraw() } } -void ScrollView::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) +void ScrollView::visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) { // quick return if not visible if (!isVisible()) @@ -560,9 +560,10 @@ void ScrollView::visit(Renderer *renderer, const kmMat4 &parentTransform, bool p return; } - bool dirty = parentTransformDirty || _transformDirty; + bool dirty = parentTransformUpdated || _transformUpdated; if(dirty) _modelViewTransform = this->transform(parentTransform); + _transformUpdated = false; // IMPORTANT: // To ease the migration to v3.0, we still support the kmGL stack, diff --git a/extensions/GUI/CCScrollView/CCScrollView.h b/extensions/GUI/CCScrollView/CCScrollView.h index 0ec96b5049..4dc5871bc9 100644 --- a/extensions/GUI/CCScrollView/CCScrollView.h +++ b/extensions/GUI/CCScrollView/CCScrollView.h @@ -225,7 +225,7 @@ public: * @js NA * @lua NA */ - virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformDirty) override; + virtual void visit(Renderer *renderer, const kmMat4 &parentTransform, bool parentTransformUpdated) override; using Node::addChild; virtual void addChild(Node * child, int zOrder, int tag) override; diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.cpp b/extensions/physics-nodes/CCPhysicsDebugNode.cpp index f1f5cdb0b6..3e5e9b434a 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.cpp +++ b/extensions/physics-nodes/CCPhysicsDebugNode.cpp @@ -182,7 +182,7 @@ static void DrawConstraint(cpConstraint *constraint, DrawNode *renderer) // implementation of PhysicsDebugNode -void PhysicsDebugNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void PhysicsDebugNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { if (! _spacePtr) { @@ -192,7 +192,7 @@ void PhysicsDebugNode::draw(Renderer *renderer, const kmMat4 &transform, bool tr cpSpaceEachShape(_spacePtr, (cpSpaceShapeIteratorFunc)DrawShape, this); cpSpaceEachConstraint(_spacePtr, (cpSpaceConstraintIteratorFunc)DrawConstraint, this); - DrawNode::draw(renderer, transform, transformDirty); + DrawNode::draw(renderer, transform, transformUpdated); DrawNode::clear(); #endif } diff --git a/extensions/physics-nodes/CCPhysicsDebugNode.h b/extensions/physics-nodes/CCPhysicsDebugNode.h index d39cf3376b..385a4938b2 100644 --- a/extensions/physics-nodes/CCPhysicsDebugNode.h +++ b/extensions/physics-nodes/CCPhysicsDebugNode.h @@ -61,7 +61,7 @@ public: void setSpace(cpSpace *space); // Overrides - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: cpSpace *_spacePtr; diff --git a/tests/Classes/ActionsTest/ActionsTest.cpp b/tests/Classes/ActionsTest/ActionsTest.cpp index 0e9167f2a0..7795b08a0c 100644 --- a/tests/Classes/ActionsTest/ActionsTest.cpp +++ b/tests/Classes/ActionsTest/ActionsTest.cpp @@ -1342,12 +1342,12 @@ void ActionFollow::onEnter() this->runAction(Follow::create(_grossini, Rect(0, 0, s.width * 2 - 100, s.height))); } -void ActionFollow::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ActionFollow::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ActionFollow::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void ActionFollow::onDraw() @@ -1649,9 +1649,9 @@ ActionCatmullRomStacked::~ActionCatmullRomStacked() CC_SAFE_RELEASE(_array2); } -void ActionCatmullRomStacked::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ActionCatmullRomStacked::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - ActionsDemo::draw(renderer, transform, transformDirty); + ActionsDemo::draw(renderer, transform, transformUpdated); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -1662,7 +1662,7 @@ void ActionCatmullRomStacked::draw(Renderer *renderer, const kmMat4 &transform, _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ActionCatmullRomStacked::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void ActionCatmullRomStacked::onDraw() @@ -1758,9 +1758,9 @@ ActionCardinalSplineStacked::~ActionCardinalSplineStacked() CC_SAFE_RELEASE(_array); } -void ActionCardinalSplineStacked::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ActionCardinalSplineStacked::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - ActionsDemo::draw(renderer, transform, transformDirty); + ActionsDemo::draw(renderer, transform, transformUpdated); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -1777,7 +1777,7 @@ void ActionCardinalSplineStacked::draw(Renderer *renderer, const kmMat4 &transfo _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ActionCardinalSplineStacked::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void ActionCardinalSplineStacked::onDraw() @@ -2125,9 +2125,9 @@ ActionCatmullRom::~ActionCatmullRom() _array2->release(); } -void ActionCatmullRom::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ActionCatmullRom::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - ActionsDemo::draw(renderer, transform, transformDirty); + ActionsDemo::draw(renderer, transform, transformUpdated); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -2139,7 +2139,7 @@ void ActionCatmullRom::draw(Renderer *renderer, const kmMat4 &transform, bool tr _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ActionCatmullRom::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } @@ -2220,9 +2220,9 @@ ActionCardinalSpline::~ActionCardinalSpline() _array->release(); } -void ActionCardinalSpline::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ActionCardinalSpline::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - ActionsDemo::draw(renderer, transform, transformDirty); + ActionsDemo::draw(renderer, transform, transformUpdated); // move to 50,50 since the "by" path will start at 50,50 kmGLPushMatrix(); @@ -2239,7 +2239,7 @@ void ActionCardinalSpline::draw(Renderer *renderer, const kmMat4 &transform, boo _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ActionCardinalSpline::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void ActionCardinalSpline::onDraw() diff --git a/tests/Classes/ActionsTest/ActionsTest.h b/tests/Classes/ActionsTest/ActionsTest.h index 6467961a8a..3545add4e7 100644 --- a/tests/Classes/ActionsTest/ActionsTest.h +++ b/tests/Classes/ActionsTest/ActionsTest.h @@ -375,7 +375,7 @@ public: CREATE_FUNC(ActionFollow); virtual void onEnter() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string subtitle() const override; protected: @@ -451,7 +451,7 @@ public: CREATE_FUNC(ActionCatmullRomStacked); virtual ~ActionCatmullRomStacked(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void onEnter() override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -472,7 +472,7 @@ public: CREATE_FUNC(ActionCardinalSplineStacked); virtual ~ActionCardinalSplineStacked(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated); virtual void onEnter() override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -567,7 +567,7 @@ public: ~ActionCatmullRom(); virtual void onEnter() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string subtitle() const override; virtual std::string title() const override; private: @@ -588,7 +588,7 @@ public: ~ActionCardinalSpline(); virtual void onEnter() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string subtitle() const override; virtual std::string title() const override; private: diff --git a/tests/Classes/Box2DTest/Box2dTest.cpp b/tests/Classes/Box2DTest/Box2dTest.cpp index 57f23413d9..799799aae8 100644 --- a/tests/Classes/Box2DTest/Box2dTest.cpp +++ b/tests/Classes/Box2DTest/Box2dTest.cpp @@ -137,14 +137,14 @@ void Box2DTestLayer::createResetButton() } -void Box2DTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Box2DTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { // // IMPORTANT: // This is only for debug purposes // It is recommend to disable it // - Layer::draw(renderer, transform, transformDirty); + Layer::draw(renderer, transform, transformUpdated); #if CC_ENABLE_BOX2D_INTEGRATION GL::enableVertexAttribs( cocos2d::GL::VERTEX_ATTRIB_FLAG_POSITION ); @@ -154,7 +154,7 @@ void Box2DTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool tran _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Box2DTestLayer::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); kmGLPopMatrix(); #endif diff --git a/tests/Classes/Box2DTest/Box2dTest.h b/tests/Classes/Box2DTest/Box2dTest.h index ce7ce93503..b9873d219a 100644 --- a/tests/Classes/Box2DTest/Box2dTest.h +++ b/tests/Classes/Box2DTest/Box2dTest.h @@ -17,7 +17,7 @@ public: void initPhysics(); void createResetButton(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void addNewSpriteAtPosition(Point p); void update(float dt); diff --git a/tests/Classes/Box2DTestBed/Box2dView.cpp b/tests/Classes/Box2DTestBed/Box2dView.cpp index 277955b9d5..eee2ea87de 100644 --- a/tests/Classes/Box2DTestBed/Box2dView.cpp +++ b/tests/Classes/Box2DTestBed/Box2dView.cpp @@ -207,13 +207,13 @@ void Box2DView::tick(float dt) m_test->Step(&settings); } -void Box2DView::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Box2DView::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Layer::draw(renderer, transform, transformDirty); + Layer::draw(renderer, transform, transformUpdated); _customCmd.init(_globalZOrder); _customCmd.func = CC_CALLBACK_0(Box2DView::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCmd); + renderer->addCommand(&_customCmd); } void Box2DView::onDraw() diff --git a/tests/Classes/Box2DTestBed/Box2dView.h b/tests/Classes/Box2DTestBed/Box2dView.h index 3e95cda7bd..aded546074 100644 --- a/tests/Classes/Box2DTestBed/Box2dView.h +++ b/tests/Classes/Box2DTestBed/Box2dView.h @@ -42,7 +42,7 @@ public: bool initWithEntryID(int entryId); std::string title() const; void tick(float dt); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; // virtual void registerWithTouchDispatcher(); bool onTouchBegan(Touch* touch, Event* event); diff --git a/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp b/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp index 0949d0163a..da1423de7f 100644 --- a/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp +++ b/tests/Classes/ClippingNodeTest/ClippingNodeTest.cpp @@ -596,7 +596,7 @@ void RawStencilBufferTest::setup() Director::getInstance()->setAlphaBlending(true); } -void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { auto winPoint = Point(Director::getInstance()->getWinSize()); @@ -614,9 +614,7 @@ void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, boo iter->func = CC_CALLBACK_0(RawStencilBufferTest::onEnableStencil, this); renderer->addCommand(&(*iter)); ++iter; - - for (int i = 0; i < _planeCount; i++) { auto stencilPoint = planeSize * (_planeCount - i); @@ -634,7 +632,7 @@ void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, boo kmGLPushMatrix(); _modelViewTransform = this->transform(transform); - _sprites.at(i)->visit(renderer, _modelViewTransform, transformDirty); + _sprites.at(i)->visit(renderer, _modelViewTransform, transformUpdated); kmGLPopMatrix(); iter->init(_globalZOrder); @@ -644,14 +642,13 @@ void RawStencilBufferTest::draw(Renderer *renderer, const kmMat4 &transform, boo kmGLPushMatrix(); _modelViewTransform = this->transform(transform); - _sprites.at(i)->visit(renderer, _modelViewTransform, transformDirty); + _sprites.at(i)->visit(renderer, _modelViewTransform, transformUpdated); kmGLPopMatrix(); } iter->init(_globalZOrder); iter->func = CC_CALLBACK_0(RawStencilBufferTest::onDisableStencil, this); renderer->addCommand(&(*iter)); - } void RawStencilBufferTest::onEnableStencil() diff --git a/tests/Classes/ClippingNodeTest/ClippingNodeTest.h b/tests/Classes/ClippingNodeTest/ClippingNodeTest.h index ed82143233..faeb155ad7 100644 --- a/tests/Classes/ClippingNodeTest/ClippingNodeTest.h +++ b/tests/Classes/ClippingNodeTest/ClippingNodeTest.h @@ -153,7 +153,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void setup(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void setupStencilForClippingOnPlane(GLint plane); virtual void setupStencilForDrawingOnPlane(GLint plane); diff --git a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp index 7439490fbf..7159ba6a7e 100644 --- a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp +++ b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.cpp @@ -114,11 +114,11 @@ DrawPrimitivesTest::DrawPrimitivesTest() { } -void DrawPrimitivesTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void DrawPrimitivesTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(DrawPrimitivesTest::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void DrawPrimitivesTest::onDraw() diff --git a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h index 8534d23894..de6a5a47f2 100644 --- a/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h +++ b/tests/Classes/DrawPrimitivesTest/DrawPrimitivesTest.h @@ -27,7 +27,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: void onDraw(); protected: diff --git a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp index adc4a84ac9..17475ff07d 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp +++ b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.cpp @@ -845,7 +845,7 @@ void TestColliderDetector::onExit() ArmatureTestLayer::onExit(); } -void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION ); kmGLPushMatrix(); @@ -1065,11 +1065,11 @@ void TestColliderDetector::update(float delta) } } } -void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TestColliderDetector::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(TestColliderDetector::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void TestColliderDetector::onDraw() @@ -1106,12 +1106,12 @@ std::string TestBoundingBox::title() const { return "Test BoundingBox"; } -void TestBoundingBox::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TestBoundingBox::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(TestBoundingBox::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); - + renderer->addCommand(&_customCommand); + } void TestBoundingBox::onDraw() diff --git a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h index 1add61178f..f7b1fa74e7 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h +++ b/tests/Classes/ExtensionsTest/CocoStudioArmatureTest/ArmatureScene.h @@ -211,7 +211,7 @@ public: virtual void onEnter() override; virtual void onExit() override; virtual std::string title() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual void update(float delta); void onFrameEvent(cocostudio::Bone *bone, const std::string& evt, int originFrameIndex, int currentFrameIndex); @@ -270,7 +270,7 @@ public: virtual void onEnter() override; virtual std::string title() const override; virtual void update(float delta); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void onDraw(); void onFrameEvent(cocostudio::Bone *bone, const std::string& evt, int originFrameIndex, int currentFrameIndex); @@ -293,7 +293,7 @@ class TestBoundingBox : public ArmatureTestLayer public: virtual void onEnter() override; virtual std::string title() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; cocostudio::Armature *armature; Rect rect; diff --git a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp index cc2523b01d..eb0362dead 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp +++ b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.cpp @@ -194,9 +194,9 @@ void SceneEditorTestLayer::backCallback(Ref *pSender) s->release(); } -void SceneEditorTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void SceneEditorTestLayer::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - Layer::draw(renderer, transform, transformDirty); + Layer::draw(renderer, transform, transformUpdated); } diff --git a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h index 523b8f9840..623b30a828 100644 --- a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h +++ b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/SceneEditorTest.h @@ -43,7 +43,7 @@ public: virtual void nextCallback(cocos2d::Ref* pSender); virtual void backCallback(cocos2d::Ref* pSender); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: MenuItemImage *restartItem; diff --git a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp index f90354d4bd..abed653fd4 100644 --- a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp +++ b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.cpp @@ -2,9 +2,9 @@ USING_NS_CC; -void CustomTableViewCell::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void CustomTableViewCell::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - TableViewCell::draw(renderer, transform, transformDirty); + TableViewCell::draw(renderer, transform, transformUpdated); // draw bounding box // auto pos = getPosition(); // auto size = Size(178, 200); diff --git a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h index a82d74375a..d7277f65da 100644 --- a/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h +++ b/tests/Classes/ExtensionsTest/TableViewTest/CustomTableViewCell.h @@ -7,7 +7,7 @@ class CustomTableViewCell : public cocos2d::extension::TableViewCell { public: - virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(cocos2d::Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; }; #endif /* __CUSTOMTABELVIEWCELL_H__ */ diff --git a/tests/Classes/LabelTest/LabelTest.cpp b/tests/Classes/LabelTest/LabelTest.cpp index 7bc56727a5..8e5bc43148 100644 --- a/tests/Classes/LabelTest/LabelTest.cpp +++ b/tests/Classes/LabelTest/LabelTest.cpp @@ -206,14 +206,14 @@ Atlas1::~Atlas1() _textureAtlas->release(); } -void Atlas1::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Atlas1::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { // GL_VERTEX_ARRAY, GL_COLOR_ARRAY, GL_TEXTURE_COORD_ARRAY // GL_TEXTURE_2D _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Atlas1::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); - + renderer->addCommand(&_customCommand); + // [textureAtlas drawNumberOfQuads:3]; } @@ -529,11 +529,11 @@ Atlas4::Atlas4() schedule( schedule_selector(Atlas4::step), 0.1f); } -void Atlas4::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void Atlas4::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(Atlas4::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void Atlas4::onDraw() @@ -1615,11 +1615,11 @@ std::string LabelBMFontBounds::subtitle() const return "You should see string enclosed by a box"; } -void LabelBMFontBounds::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void LabelBMFontBounds::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(LabelBMFontBounds::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void LabelBMFontBounds::onDraw() diff --git a/tests/Classes/LabelTest/LabelTest.h b/tests/Classes/LabelTest/LabelTest.h index fcc18d37c1..f549e0d542 100644 --- a/tests/Classes/LabelTest/LabelTest.h +++ b/tests/Classes/LabelTest/LabelTest.h @@ -35,7 +35,7 @@ public: ~Atlas1(); virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: void onDraw(); protected: @@ -102,7 +102,7 @@ public: Atlas4(); virtual void step(float dt); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -377,7 +377,7 @@ public: LabelBMFontBounds(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string title() const override; virtual std::string subtitle() const override; protected: diff --git a/tests/Classes/LabelTest/LabelTestNew.cpp b/tests/Classes/LabelTest/LabelTestNew.cpp index e1c320bae9..276407e139 100644 --- a/tests/Classes/LabelTest/LabelTestNew.cpp +++ b/tests/Classes/LabelTest/LabelTestNew.cpp @@ -309,12 +309,12 @@ LabelFNTSpriteActions::LabelFNTSpriteActions() schedule( schedule_selector(LabelFNTSpriteActions::step), 0.1f); } -void LabelFNTSpriteActions::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void LabelFNTSpriteActions::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(LabelFNTSpriteActions::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); - + renderer->addCommand(&_renderCmd); + } void LabelFNTSpriteActions::onDraw() @@ -926,11 +926,11 @@ std::string LabelFNTBounds::subtitle() const return "You should see string enclosed by a box"; } -void LabelFNTBounds::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void LabelFNTBounds::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(LabelFNTBounds::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); + renderer->addCommand(&_renderCmd); } void LabelFNTBounds::onDraw() @@ -1515,11 +1515,11 @@ void LabelTTFOldNew::onDraw() kmGLLoadMatrix(&oldMat); } -void LabelTTFOldNew::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void LabelTTFOldNew::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(LabelTTFOldNew::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); + renderer->addCommand(&_renderCmd); } std::string LabelTTFOldNew::title() const diff --git a/tests/Classes/LabelTest/LabelTestNew.h b/tests/Classes/LabelTest/LabelTestNew.h index b567056a9d..179ea50d98 100644 --- a/tests/Classes/LabelTest/LabelTestNew.h +++ b/tests/Classes/LabelTest/LabelTestNew.h @@ -57,7 +57,7 @@ public: LabelFNTSpriteActions(); virtual void step(float dt); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string title() const override; virtual std::string subtitle() const override; @@ -222,7 +222,7 @@ public: LabelFNTBounds(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string title() const override; virtual std::string subtitle() const override; private: @@ -411,7 +411,7 @@ public: LabelTTFOldNew(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string title() const override; virtual std::string subtitle() const override; diff --git a/tests/Classes/MutiTouchTest/MutiTouchTest.cpp b/tests/Classes/MutiTouchTest/MutiTouchTest.cpp index 23933b76b4..a17e5a072f 100644 --- a/tests/Classes/MutiTouchTest/MutiTouchTest.cpp +++ b/tests/Classes/MutiTouchTest/MutiTouchTest.cpp @@ -17,7 +17,7 @@ public: setShaderProgram(ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR)); } - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { DrawPrimitives::setDrawColor4B(_touchColor.r, _touchColor.g, _touchColor.b, 255); glLineWidth(10); diff --git a/tests/Classes/NodeTest/NodeTest.cpp b/tests/Classes/NodeTest/NodeTest.cpp index a3e10a4753..900de637a2 100644 --- a/tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/Classes/NodeTest/NodeTest.cpp @@ -974,7 +974,7 @@ public: sprite->setShaderProgram(shader); return sprite; } - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void onDraw(); protected: @@ -982,11 +982,11 @@ protected: }; -void MySprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void MySprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(MySprite::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void MySprite::onDraw() diff --git a/tests/Classes/RenderTextureTest/RenderTextureTest.cpp b/tests/Classes/RenderTextureTest/RenderTextureTest.cpp index 4107b99ff1..31e670ce72 100644 --- a/tests/Classes/RenderTextureTest/RenderTextureTest.cpp +++ b/tests/Classes/RenderTextureTest/RenderTextureTest.cpp @@ -462,32 +462,31 @@ RenderTextureTestDepthStencil::~RenderTextureTestDepthStencil() CC_SAFE_RELEASE(_spriteDS); } -void RenderTextureTestDepthStencil::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void RenderTextureTestDepthStencil::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmds[0].init(_globalZOrder); _renderCmds[0].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onBeforeClear, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmds[0]); - + renderer->addCommand(&_renderCmds[0]); + _rend->beginWithClear(0, 0, 0, 0, 0, 0); _renderCmds[1].init(_globalZOrder); _renderCmds[1].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onBeforeStencil, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmds[1]); - + renderer->addCommand(&_renderCmds[1]); + _spriteDS->visit(); _renderCmds[2].init(_globalZOrder); _renderCmds[2].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onBeforDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmds[2]); - + renderer->addCommand(&_renderCmds[2]); + _spriteDraw->visit(); _rend->end(); _renderCmds[3].init(_globalZOrder); _renderCmds[3].func = CC_CALLBACK_0(RenderTextureTestDepthStencil::onAfterDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmds[3]); - + renderer->addCommand(&_renderCmds[3]); } void RenderTextureTestDepthStencil::onBeforeClear() @@ -630,13 +629,13 @@ SpriteRenderTextureBug::SimpleSprite* SpriteRenderTextureBug::SimpleSprite::crea return sprite; } -void SpriteRenderTextureBug::SimpleSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void SpriteRenderTextureBug::SimpleSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(SpriteRenderTextureBug::SimpleSprite::onBeforeDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); - - Sprite::draw(renderer, transform, transformDirty); + renderer->addCommand(&_customCommand); + + Sprite::draw(renderer, transform, transformUpdated); } diff --git a/tests/Classes/RenderTextureTest/RenderTextureTest.h b/tests/Classes/RenderTextureTest/RenderTextureTest.h index 88aead2bfc..18b71928b3 100644 --- a/tests/Classes/RenderTextureTest/RenderTextureTest.h +++ b/tests/Classes/RenderTextureTest/RenderTextureTest.h @@ -86,7 +86,7 @@ public: virtual ~RenderTextureTestDepthStencil(); virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; private: CustomCommand _renderCmds[4]; void onBeforeClear(); @@ -125,7 +125,7 @@ public: public: static SimpleSprite* create(const char* filename, const Rect &rect); SimpleSprite(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty); + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated); protected: void onBeforeDraw(); diff --git a/tests/Classes/ShaderTest/ShaderTest.cpp b/tests/Classes/ShaderTest/ShaderTest.cpp index 6818dc9869..5fccff59f5 100644 --- a/tests/Classes/ShaderTest/ShaderTest.cpp +++ b/tests/Classes/ShaderTest/ShaderTest.cpp @@ -191,11 +191,11 @@ void ShaderNode::setPosition(const Point &newPosition) _center = Vertex2F(position.x * CC_CONTENT_SCALE_FACTOR(), position.y * CC_CONTENT_SCALE_FACTOR()); } -void ShaderNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ShaderNode::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(ShaderNode::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void ShaderNode::onDraw() @@ -433,7 +433,7 @@ public: ~SpriteBlur(); void setBlurSize(float f); bool initWithTexture(Texture2D* texture, const Rect& rect); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void initProgram(); static SpriteBlur* create(const char *pszFileName); @@ -525,11 +525,11 @@ void SpriteBlur::initProgram() CHECK_GL_ERROR_DEBUG(); } -void SpriteBlur::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void SpriteBlur::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _customCommand.init(_globalZOrder); _customCommand.func = CC_CALLBACK_0(SpriteBlur::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_customCommand); + renderer->addCommand(&_customCommand); } void SpriteBlur::onDraw() diff --git a/tests/Classes/ShaderTest/ShaderTest.h b/tests/Classes/ShaderTest/ShaderTest.h index 677efd4a59..7f40f7e313 100644 --- a/tests/Classes/ShaderTest/ShaderTest.h +++ b/tests/Classes/ShaderTest/ShaderTest.h @@ -121,7 +121,7 @@ public: virtual void update(float dt); virtual void setPosition(const Point &newPosition); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; static ShaderNode* shaderNodeWithVertex(const char *vert, const char *frag); diff --git a/tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/Classes/ShaderTest/ShaderTest2.cpp index e605ef78e9..e506e64b4d 100644 --- a/tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/Classes/ShaderTest/ShaderTest2.cpp @@ -112,7 +112,7 @@ public: virtual void initShader(); void setBackgroundNotification(); - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; void listenBackToForeground(Ref *obj); protected: @@ -176,12 +176,12 @@ void ShaderSprite::initShader() CHECK_GL_ERROR_DEBUG(); } -void ShaderSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void ShaderSprite::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCommand.init(_globalZOrder); _renderCommand.func = CC_CALLBACK_0(ShaderSprite::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCommand); - + renderer->addCommand(&_renderCommand); + } void ShaderSprite::onDraw() diff --git a/tests/Classes/Texture2dTest/Texture2dTest.cpp b/tests/Classes/Texture2dTest/Texture2dTest.cpp index a5cd917408..7c6fed175a 100644 --- a/tests/Classes/Texture2dTest/Texture2dTest.cpp +++ b/tests/Classes/Texture2dTest/Texture2dTest.cpp @@ -1791,13 +1791,13 @@ std::string TextureDrawAtPoint::subtitle() const return "draws 2 textures using drawAtPoint"; } -void TextureDrawAtPoint::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TextureDrawAtPoint::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - TextureDemo::draw(renderer, transform, transformDirty); + TextureDemo::draw(renderer, transform, transformUpdated); _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TextureDrawAtPoint::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); + renderer->addCommand(&_renderCmd); } @@ -1832,14 +1832,13 @@ TextureDrawInRect::~TextureDrawInRect() _Tex2F->release(); } -void TextureDrawInRect::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TextureDrawInRect::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { - TextureDemo::draw(renderer, transform, transformDirty); + TextureDemo::draw(renderer, transform, transformUpdated); _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TextureDrawInRect::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); - + renderer->addCommand(&_renderCmd); } void TextureDrawInRect::onDraw() diff --git a/tests/Classes/Texture2dTest/Texture2dTest.h b/tests/Classes/Texture2dTest/Texture2dTest.h index 672da26333..90fb0adb06 100644 --- a/tests/Classes/Texture2dTest/Texture2dTest.h +++ b/tests/Classes/Texture2dTest/Texture2dTest.h @@ -466,7 +466,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void onEnter() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: CustomCommand _renderCmd; void onDraw(); @@ -482,7 +482,7 @@ public: virtual std::string title() const override; virtual std::string subtitle() const override; virtual void onEnter() override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: CustomCommand _renderCmd; void onDraw(); diff --git a/tests/Classes/TileMapTest/TileMapTest.cpp b/tests/Classes/TileMapTest/TileMapTest.cpp index b44fefa4fa..198874d30a 100644 --- a/tests/Classes/TileMapTest/TileMapTest.cpp +++ b/tests/Classes/TileMapTest/TileMapTest.cpp @@ -755,11 +755,11 @@ TMXOrthoObjectsTest::TMXOrthoObjectsTest() CCLOG("%s", objectsVal.getDescription().c_str()); } -void TMXOrthoObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TMXOrthoObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TMXOrthoObjectsTest::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); + renderer->addCommand(&_renderCmd); } void TMXOrthoObjectsTest::onDraw() @@ -829,11 +829,11 @@ TMXIsoObjectsTest::TMXIsoObjectsTest() CCLOG("%s", objectsVal.getDescription().c_str()); } -void TMXIsoObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TMXIsoObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TMXIsoObjectsTest::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); + renderer->addCommand(&_renderCmd); } void TMXIsoObjectsTest::onDraw() @@ -1513,11 +1513,11 @@ TMXGIDObjectsTest::TMXGIDObjectsTest() } -void TMXGIDObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) +void TMXGIDObjectsTest::draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) { _renderCmd.init(_globalZOrder); _renderCmd.func = CC_CALLBACK_0(TMXGIDObjectsTest::onDraw, this); - Director::getInstance()->getRenderer()->addCommand(&_renderCmd); + renderer->addCommand(&_renderCmd); } void TMXGIDObjectsTest::onDraw() diff --git a/tests/Classes/TileMapTest/TileMapTest.h b/tests/Classes/TileMapTest/TileMapTest.h index 85ad393a56..7c34b3dfc1 100644 --- a/tests/Classes/TileMapTest/TileMapTest.h +++ b/tests/Classes/TileMapTest/TileMapTest.h @@ -134,7 +134,7 @@ public: TMXOrthoObjectsTest(void); virtual std::string title() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string subtitle() const override; protected: CustomCommand _renderCmd; @@ -147,7 +147,7 @@ public: TMXIsoObjectsTest(void); virtual std::string title() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; virtual std::string subtitle() const override; protected: CustomCommand _renderCmd; @@ -292,7 +292,7 @@ public: TMXGIDObjectsTest(); virtual std::string title() const override; virtual std::string subtitle() const override; - virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformDirty) override; + virtual void draw(Renderer *renderer, const kmMat4 &transform, bool transformUpdated) override; protected: CustomCommand _renderCmd; From da8e5718627be38c2b50b0a24b906f4ee728a75c Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 16:14:55 -0800 Subject: [PATCH 37/69] shaders set in the correct position --- cocos/2d/CCParticleSystemQuad.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCParticleSystemQuad.cpp b/cocos/2d/CCParticleSystemQuad.cpp index 1f11b4c4d6..58969c9298 100644 --- a/cocos/2d/CCParticleSystemQuad.cpp +++ b/cocos/2d/CCParticleSystemQuad.cpp @@ -364,7 +364,7 @@ void ParticleSystemQuad::draw(Renderer *renderer, const kmMat4 &transform, bool //quad command if(_particleIdx > 0) { - _quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, _quads, _particleIdx, _modelViewTransform); + _quadCommand.init(_globalZOrder, _texture->getName(), _shaderProgram, _blendFunc, _quads, _particleIdx, transform); renderer->addCommand(&_quadCommand); } } From 9d501479c12095f18719c3c495149e0e243b5ce3 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 16:19:27 -0800 Subject: [PATCH 38/69] removes unused ivar from ParticleSystemQuad --- cocos/2d/CCParticleSystemQuad.h | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/cocos/2d/CCParticleSystemQuad.h b/cocos/2d/CCParticleSystemQuad.h index 3e48129ac0..fa26342554 100644 --- a/cocos/2d/CCParticleSystemQuad.h +++ b/cocos/2d/CCParticleSystemQuad.h @@ -151,15 +151,12 @@ protected: bool allocMemory(); V3F_C4B_T2F_Quad *_quads; // quads to be rendered - GLushort *_indices; // indices - - GLuint _VAOname; - - GLuint _buffersVBO[2]; //0: vertex 1: indices + GLushort *_indices; // indices + GLuint _VAOname; + GLuint _buffersVBO[2]; //0: vertex 1: indices + + QuadCommand _quadCommand; // quad command - kmMat4 _transformMatrix; - - QuadCommand _quadCommand; // quad command private: CC_DISALLOW_COPY_AND_ASSIGN(ParticleSystemQuad); }; From 35880414098775c2dce2af028ad36fafbac0d529 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 16:39:04 -0800 Subject: [PATCH 39/69] removed empty spaces --- cocos/2d/CCNode.cpp | 1 - 1 file changed, 1 deletion(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 2413d1fefd..ff3c938ed9 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -900,7 +900,6 @@ void Node::sortAllChildren() } } - void Node::draw() { auto renderer = Director::getInstance()->getRenderer(); From 5a2697816f6eee0b7904953d7c9d0c0fff43b309 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 16:41:37 -0800 Subject: [PATCH 40/69] Updates CHANGELOG --- CHANGELOG | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index ebbd7781f7..6f31a87c5c 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,8 +13,9 @@ cocos2d-x-3.0rc0 Feb.?? 2014 Node: set/get VertexZ() -> set/get PositionZ() Node: setRotationX() -> setRotationSkewX() Node: setRotationY() -> setRotationSkewY() + Node: visit() and draw() new arguments: Renderer, parentTransform, and whether or not the parentTransform has changed since the last frame [NEW] Language: Added Dutch support. - [NEW] Sprite: Added auto-culling support + [NEW] Sprite: Added auto-culling support. Performance increased in about 100% when many sprites are outside the screen [FIX] spine::Skeleton would not be updated after being re-added to scene. [FIX] Loading custom fonts from ttf file fails on windows. From 3bacd45240da2c2d80626bba57c7aa9b4f2f6074 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 21:47:11 -0800 Subject: [PATCH 41/69] indentation fix in CHANGELOG --- CHANGELOG | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CHANGELOG b/CHANGELOG index 6f31a87c5c..be1918594a 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -13,7 +13,7 @@ cocos2d-x-3.0rc0 Feb.?? 2014 Node: set/get VertexZ() -> set/get PositionZ() Node: setRotationX() -> setRotationSkewX() Node: setRotationY() -> setRotationSkewY() - Node: visit() and draw() new arguments: Renderer, parentTransform, and whether or not the parentTransform has changed since the last frame + Node: visit() and draw() new arguments: Renderer, parentTransform, and whether or not the parentTransform has changed since the last frame [NEW] Language: Added Dutch support. [NEW] Sprite: Added auto-culling support. Performance increased in about 100% when many sprites are outside the screen From b50a787f6d5d079b89a7fa46391e8fdf846798c6 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 22:03:36 -0800 Subject: [PATCH 42/69] Adds new ParticleTest for auto-batching --- cocos/2d/CCProgressTimer.cpp | 3 +- tests/Classes/ParticleTest/ParticleTest.cpp | 38 +++++++++++++++++++-- tests/Classes/ParticleTest/ParticleTest.h | 8 +++++ tests/Classes/ShaderTest/ShaderTest2.cpp | 2 +- 4 files changed, 47 insertions(+), 4 deletions(-) diff --git a/cocos/2d/CCProgressTimer.cpp b/cocos/2d/CCProgressTimer.cpp index 9e47e78dbb..2b51dfbdd0 100644 --- a/cocos/2d/CCProgressTimer.cpp +++ b/cocos/2d/CCProgressTimer.cpp @@ -532,7 +532,8 @@ void ProgressTimer::onDraw() if(_type == Type::RADIAL) { glDrawArrays(GL_TRIANGLE_FAN, 0, _vertexDataCount); - } + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,_vertexDataCount); + } else if (_type == Type::BAR) { if (!_reverseDirection) diff --git a/tests/Classes/ParticleTest/ParticleTest.cpp b/tests/Classes/ParticleTest/ParticleTest.cpp index 5ff2d34e6b..0d91cb729a 100644 --- a/tests/Classes/ParticleTest/ParticleTest.cpp +++ b/tests/Classes/ParticleTest/ParticleTest.cpp @@ -958,8 +958,6 @@ enum static int sceneIdx = -1; -#define MAX_LAYER 45 - Layer* createParticleLayer(int nIndex) { switch(nIndex) @@ -1010,12 +1008,14 @@ Layer* createParticleLayer(int nIndex) case 42: return new PremultipliedAlphaTest(); case 43: return new PremultipliedAlphaTest2(); case 44: return new Issue3990(); + case 45: return new ParticleAutoBatching(); default: break; } return NULL; } +#define MAX_LAYER 46 Layer* nextParticleAction() @@ -1922,6 +1922,40 @@ std::string Issue3990::subtitle() const return "Show '998' or '999' at bottom right side"; } + +// +// ParticleAutoBatching +// +void ParticleAutoBatching::onEnter() +{ + ParticleDemo::onEnter(); + + _color->setColor(Color3B::BLACK); + this->removeChild(_background, true); + _background = NULL; + + Size s = Director::getInstance()->getWinSize(); + + for(int i=0; i<10; i++) { + auto particle = ParticleSystemQuad::create("Particles/SmallSun.plist"); + particle->setTotalParticles(100); + particle->setPosition(Point(i*s.width/11, s.height/2)); + this->addChild(particle ,10); + } +} + +std::string ParticleAutoBatching::title() const +{ + return "AutoBatching"; +} + +std::string ParticleAutoBatching::subtitle() const +{ + return "All 10 particles should be drawin in one batch"; +} + +// +// main // void ParticleTestScene::runThisTest() { diff --git a/tests/Classes/ParticleTest/ParticleTest.h b/tests/Classes/ParticleTest/ParticleTest.h index 42d91981e7..6ca6cc1240 100644 --- a/tests/Classes/ParticleTest/ParticleTest.h +++ b/tests/Classes/ParticleTest/ParticleTest.h @@ -309,4 +309,12 @@ public: virtual std::string subtitle() const override; }; +class ParticleAutoBatching : public ParticleDemo +{ +public: + virtual void onEnter() override; + virtual std::string title() const override; + virtual std::string subtitle() const override; +}; + #endif diff --git a/tests/Classes/ShaderTest/ShaderTest2.cpp b/tests/Classes/ShaderTest/ShaderTest2.cpp index e506e64b4d..1758def00a 100644 --- a/tests/Classes/ShaderTest/ShaderTest2.cpp +++ b/tests/Classes/ShaderTest/ShaderTest2.cpp @@ -212,8 +212,8 @@ void ShaderSprite::onDraw() diff = offsetof( V3F_C4B_T2F, colors); glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_COLOR, 4, GL_UNSIGNED_BYTE, GL_TRUE, kQuadSize, (void*)(offset + diff)); - glDrawArrays(GL_TRIANGLE_STRIP, 0, 4); + CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1, 4); } class NormalSprite : public ShaderSprite, public ShaderSpriteCreator From e6d2c4ec731e4b87f79286d32761afe06f430113 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sat, 1 Mar 2014 13:30:20 +0800 Subject: [PATCH 43/69] Refactors Scheduler class. * Timer is an abstract class now. * Adds three new timers ( `TimerTargetSelector`, `TimerTargetCallback`, `TimerScriptHandler`) which are inherited from Timer. * Adds new API 'scheduleCallback` / `unscheduleCallbackForKey', and callback's target could be any classes since we're using `void*` to identify target. * `Scheduler::scheduleCallback` use `std::function`, therefore, it supports passing `lambda`, `member_function` and `global_function`. * The old selector API is still kept since it's very useful when schedule callback is a member function, it doesn't need a `key` to identify the callback function. (+1 squashed commit) * Adds relevant test cases. --- cocos/2d/CCDirector.cpp | 4 +- cocos/2d/CCNode.cpp | 19 +- cocos/2d/CCScheduler.cpp | 397 ++++++++++++------ cocos/2d/CCScheduler.h | 223 ++++++---- cocos/2d/CCScriptSupport.cpp | 4 +- cocos/2d/CCScriptSupport.h | 6 +- cocos/2d/CCTextureCache.cpp | 4 +- tests/Classes/SchedulerTest/SchedulerTest.cpp | 68 ++- tests/Classes/SchedulerTest/SchedulerTest.h | 15 + 9 files changed, 479 insertions(+), 261 deletions(-) diff --git a/cocos/2d/CCDirector.cpp b/cocos/2d/CCDirector.cpp index d5af6ac15b..fb3ddd8d08 100644 --- a/cocos/2d/CCDirector.cpp +++ b/cocos/2d/CCDirector.cpp @@ -140,9 +140,7 @@ bool Director::init(void) _scheduler = new Scheduler(); // action manager _actionManager = new ActionManager(); - _scheduler->scheduleUpdate([this](float dt){ - this->_actionManager->update(dt); - }, _actionManager, Scheduler::PRIORITY_SYSTEM, false); + _scheduler->scheduleUpdateForTarget(_actionManager, Scheduler::PRIORITY_SYSTEM, false); _eventDispatcher = new EventDispatcher(); _eventAfterDraw = new EventCustom(EVENT_AFTER_DRAW); diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 49472cf822..581b341e7b 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1115,7 +1115,7 @@ void Node::setScheduler(Scheduler* scheduler) bool Node::isScheduled(SEL_SCHEDULE selector) { - return _scheduler->isScheduled(this, schedule_selector_to_key(selector)); + return _scheduler->isScheduledForTarget(this, selector); } void Node::scheduleUpdate() @@ -1125,9 +1125,7 @@ void Node::scheduleUpdate() void Node::scheduleUpdateWithPriority(int priority) { - _scheduler->scheduleUpdate([this](float dt){ - this->update(dt); - }, this, priority, !_running); + _scheduler->scheduleUpdateForTarget(this, priority, !_running); } void Node::scheduleUpdateWithPriorityLua(int nHandler, int priority) @@ -1137,14 +1135,13 @@ void Node::scheduleUpdateWithPriorityLua(int nHandler, int priority) #if CC_ENABLE_SCRIPT_BINDING _updateScriptHandler = nHandler; #endif - _scheduler->scheduleUpdate([this](float dt){ - this->update(dt); - }, this, priority, !_running); + + _scheduler->scheduleUpdateForTarget(this, priority, !_running); } void Node::unscheduleUpdate() { - _scheduler->unscheduleUpdate(this); + _scheduler->unscheduleUpdateForTarget(this); #if CC_ENABLE_SCRIPT_BINDING if (_updateScriptHandler) @@ -1170,9 +1167,7 @@ void Node::schedule(SEL_SCHEDULE selector, float interval, unsigned int repeat, CCASSERT( selector, "Argument must be non-nil"); CCASSERT( interval >=0, "Argument must be positive"); - _scheduler->schedule([=](float dt){ - (this->*selector)(dt); - }, this, schedule_selector_to_key(selector), interval , repeat, delay, !_running); + _scheduler->scheduleSelector(selector, this, interval , repeat, delay, !_running); } void Node::scheduleOnce(SEL_SCHEDULE selector, float delay) @@ -1186,7 +1181,7 @@ void Node::unschedule(SEL_SCHEDULE selector) if (selector == nullptr) return; - _scheduler->unschedule(this, schedule_selector_to_key(selector)); + _scheduler->unscheduleSelector(selector, this); } void Node::unscheduleAllSelectors() diff --git a/cocos/2d/CCScheduler.cpp b/cocos/2d/CCScheduler.cpp index 110f34aad9..9ddb825e18 100644 --- a/cocos/2d/CCScheduler.cpp +++ b/cocos/2d/CCScheduler.cpp @@ -33,28 +33,16 @@ THE SOFTWARE. #include "CCArray.h" #include "CCScriptSupport.h" -using namespace std; - NS_CC_BEGIN -long schedule_selector_to_key(SEL_SCHEDULE selector) -{ - static union{ - SEL_SCHEDULE func; - long key; - }; - func = selector; - return key; -} - // data structures // A list double-linked list used for "updates with priority" typedef struct _listEntry { struct _listEntry *prev, *next; - void *target; ccSchedulerFunc callback; + void *target; int priority; bool paused; bool markedForDeletion; // selector will no longer be called and entry will be removed at end of the next tick @@ -84,65 +72,24 @@ typedef struct _hashSelectorEntry // implementation Timer Timer::Timer() -: _target(nullptr) -, _elapsed(-1) +: _elapsed(-1) , _runForever(false) , _useDelay(false) , _timesExecuted(0) , _repeat(0) , _delay(0.0f) , _interval(0.0f) -, _callback(nullptr) -, _key(0) -#if CC_ENABLE_SCRIPT_BINDING -, _scriptHandler(0) -#endif { } -Timer* Timer::create(const ccSchedulerFunc& callback, void *target, long key, float seconds/* = 0 */) +void Timer::setupTimerWithInterval(float seconds, unsigned int repeat, float delay) { - Timer *timer = new Timer(); - - timer->initWithTarget(callback, target, key, seconds, kRepeatForever, 0.0f); - timer->autorelease(); - - return timer; -} - -#if CC_ENABLE_SCRIPT_BINDING -Timer* Timer::createWithScriptHandler(int handler, float seconds) -{ - Timer *timer = new Timer(); - - timer->initWithScriptHandler(handler, seconds); - timer->autorelease(); - - return timer; -} - -bool Timer::initWithScriptHandler(int handler, float seconds) -{ - _scriptHandler = handler; - _elapsed = -1; - _interval = seconds; - - return true; -} -#endif - -bool Timer::initWithTarget(const ccSchedulerFunc& callback, void *target, long key, float seconds, unsigned int repeat, float delay) -{ - _target = target; - _callback = callback; - _key = key; - _elapsed = -1; - _interval = seconds; - _delay = delay; - _useDelay = (delay > 0.0f) ? true : false; - _repeat = repeat; - _runForever = (repeat == kRepeatForever) ? true : false; - return true; + _elapsed = -1; + _interval = seconds; + _delay = delay; + _useDelay = (_delay > 0.0f) ? true : false; + _repeat = repeat; + _runForever = (_repeat == kRepeatForever) ? true : false; } void Timer::update(float dt) @@ -159,18 +106,8 @@ void Timer::update(float dt) _elapsed += dt; if (_elapsed >= _interval) { - if (_target && _key != 0 && _callback) - { - _callback(_elapsed); - } -#if CC_ENABLE_SCRIPT_BINDING - if (0 != _scriptHandler) - { - SchedulerScriptData data(_scriptHandler,_elapsed); - ScriptEvent event(kScheduleEvent,&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif + trigger(); + _elapsed = 0; } } @@ -181,19 +118,8 @@ void Timer::update(float dt) { if( _elapsed >= _delay ) { - if (_target && _key != 0 && _callback) - { - _callback(_elapsed); - } - -#if CC_ENABLE_SCRIPT_BINDING - if (0 != _scriptHandler) - { - SchedulerScriptData data(_scriptHandler,_elapsed); - ScriptEvent event(kScheduleEvent,&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif + trigger(); + _elapsed = _elapsed - _delay; _timesExecuted += 1; _useDelay = false; @@ -203,19 +129,7 @@ void Timer::update(float dt) { if (_elapsed >= _interval) { - if (_target && _key != 0 && _callback) - { - _callback(_elapsed); - } - -#if CC_ENABLE_SCRIPT_BINDING - if (0 != _scriptHandler) - { - SchedulerScriptData data(_scriptHandler,_elapsed); - ScriptEvent event(kScheduleEvent,&data); - ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); - } -#endif + trigger(); _elapsed = 0; _timesExecuted += 1; @@ -225,12 +139,106 @@ void Timer::update(float dt) if (!_runForever && _timesExecuted > _repeat) { //unschedule timer - Director::getInstance()->getScheduler()->unschedule(_target, _key); + cancel(); } } } } + +// TimerTargetSelector + +TimerTargetSelector::TimerTargetSelector() +: _target(nullptr) +, _selector(nullptr) +{ +} + +bool TimerTargetSelector::initWithSelector(SEL_SCHEDULE selector, Ref* target, float seconds, unsigned int repeat, float delay) +{ + _target = target; + _selector = selector; + setupTimerWithInterval(seconds, repeat, delay); + return true; +} + +void TimerTargetSelector::trigger() +{ + if (_target && _selector) + { + (_target->*_selector)(_elapsed); + } +} + +void TimerTargetSelector::cancel() +{ + Director::getInstance()->getScheduler()->unscheduleSelector(_selector, _target); +} + +// TimerTargetCallback + +TimerTargetCallback::TimerTargetCallback() +: _target(nullptr) +, _callback(nullptr) +{ +} + +bool TimerTargetCallback::initWithLambda(const ccSchedulerFunc& callback, void *target, const std::string& key, float seconds, unsigned int repeat, float delay) +{ + _target = target; + _callback = callback; + _key = key; + setupTimerWithInterval(seconds, repeat, delay); + return true; +} + +void TimerTargetCallback::trigger() +{ + if (_callback) + { + _callback(_elapsed); + } +} + +void TimerTargetCallback::cancel() +{ + Director::getInstance()->getScheduler()->unscheduleCallbackForKey(_key, _target); +} + +#if CC_ENABLE_SCRIPT_BINDING + +// TimerScriptHandler + +bool TimerScriptHandler::initWithScriptHandler(int handler, float seconds) +{ + _scriptHandler = handler; + _elapsed = -1; + _interval = seconds; + + return true; +} + +void TimerScriptHandler::trigger() +{ + if (0 != _scriptHandler) + { + SchedulerScriptData data(_scriptHandler,_elapsed); + ScriptEvent event(kScheduleEvent,&data); + ScriptEngineManager::getInstance()->getScriptEngine()->sendEvent(&event); + } +} + +void TimerScriptHandler::cancel() +{ + if (0 != _scriptHandler) + { + ScriptEngineManager::getInstance()->getScriptEngine()->removeScriptHandler(_scriptHandler); + _scriptHandler = 0; + } +} + +#endif + // implementation of Scheduler // Priority level reserved for system services. @@ -269,15 +277,15 @@ void Scheduler::removeHashElement(_hashSelectorEntry *element) free(element); } -void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, long key, float interval, bool paused) +void Scheduler::scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, bool paused) { - this->schedule(callback, target, key, interval, kRepeatForever, 0.0f, paused); + this->scheduleCallback(callback, target, key, interval, kRepeatForever, 0.0f, paused); } -void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, long key, float interval, unsigned int repeat, float delay, bool paused) +void Scheduler::scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, unsigned int repeat, float delay, bool paused) { CCASSERT(target, "Argument target must be non-nullptr"); - CCASSERT(key != 0, "key should not be empty!"); + CCASSERT(!key.empty(), "key should not be empty!"); tHashTimerEntry *element = nullptr; HASH_FIND_PTR(_hashForTimers, &target, element); @@ -305,7 +313,7 @@ void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, long key { for (int i = 0; i < element->timers->num; ++i) { - Timer *timer = (Timer*)element->timers->arr[i]; + TimerTargetCallback *timer = static_cast(element->timers->arr[i]); if (key == timer->getKey()) { @@ -317,16 +325,16 @@ void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, long key ccArrayEnsureExtraCapacity(element->timers, 1); } - Timer *timer = new Timer(); - timer->initWithTarget(callback, target, key, interval, repeat, delay); + TimerTargetCallback *timer = new TimerTargetCallback(); + timer->initWithLambda(callback, target, key, interval, repeat, delay); ccArrayAppendObject(element->timers, timer); timer->release(); } -void Scheduler::unschedule(void *target, long key) +void Scheduler::unscheduleCallbackForKey(const std::string &key, void *target) { // explicity handle nil arguments when removing an object - if (target == nullptr || key == 0) + if (target == nullptr || key.empty()) { return; } @@ -341,7 +349,7 @@ void Scheduler::unschedule(void *target, long key) { for (int i = 0; i < element->timers->num; ++i) { - Timer *timer = static_cast(element->timers->arr[i]); + TimerTargetCallback *timer = static_cast(element->timers->arr[i]); if (key == timer->getKey()) { @@ -453,7 +461,7 @@ void Scheduler::appendIn(_listEntry **list, const ccSchedulerFunc& callback, voi HASH_ADD_PTR(_hashForUpdates, target, hashElement); } -void Scheduler::scheduleUpdate(const ccSchedulerFunc& callback, void *target, int priority, bool paused) +void Scheduler::scheduleCallbackPerFrame(const ccSchedulerFunc& callback, void *target, int priority, bool paused) { tHashUpdateEntry *hashElement = nullptr; HASH_FIND_PTR(_hashForUpdates, &target, hashElement); @@ -485,9 +493,9 @@ void Scheduler::scheduleUpdate(const ccSchedulerFunc& callback, void *target, in } } -bool Scheduler::isScheduled(void *target, long key) +bool Scheduler::isScheduledForKey(const std::string& key, void *target) { - CCASSERT(key != 0, "Argument key must be empty"); + CCASSERT(!key.empty(), "Argument key must not be empty"); CCASSERT(target, "Argument target must be non-nullptr"); tHashTimerEntry *element = nullptr; @@ -501,11 +509,12 @@ bool Scheduler::isScheduled(void *target, long key) if (element->timers == nullptr) { return false; - }else + } + else { for (int i = 0; i < element->timers->num; ++i) { - Timer *timer = (Timer*)element->timers->arr[i]; + TimerTargetCallback *timer = static_cast(element->timers->arr[i]); if (key == timer->getKey()) { @@ -536,7 +545,7 @@ void Scheduler::removeUpdateFromHash(struct _listEntry *entry) } } -void Scheduler::unscheduleUpdate(void* target) +void Scheduler::unscheduleUpdateForTarget(void *target) { if (target == nullptr) { @@ -585,7 +594,7 @@ void Scheduler::unscheduleAllWithMinPriority(int minPriority) { if(entry->priority >= minPriority) { - unscheduleUpdate(entry->target); + unscheduleUpdateForTarget(entry->target); } } } @@ -594,7 +603,7 @@ void Scheduler::unscheduleAllWithMinPriority(int minPriority) { DL_FOREACH_SAFE(_updates0List, entry, tmp) { - unscheduleUpdate(entry->target); + unscheduleUpdateForTarget(entry->target); } } @@ -602,7 +611,7 @@ void Scheduler::unscheduleAllWithMinPriority(int minPriority) { if(entry->priority >= minPriority) { - unscheduleUpdate(entry->target); + unscheduleUpdateForTarget(entry->target); } } #if CC_ENABLE_SCRIPT_BINDING @@ -643,7 +652,7 @@ void Scheduler::unscheduleAllForTarget(void *target) } // update selector - unscheduleUpdate(target); + unscheduleUpdateForTarget(target); } #if CC_ENABLE_SCRIPT_BINDING @@ -959,38 +968,146 @@ void Scheduler::update(float dt) } } -//OLD METHODS: void Scheduler::scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) { - target->retain(); - this->schedule([=](float dt){ - (target->*selector)(dt); - }, target, schedule_selector_to_key(selector), interval , repeat, delay, paused); + CCASSERT(target, "Argument target must be non-nullptr"); + + tHashTimerEntry *element = nullptr; + HASH_FIND_PTR(_hashForTimers, &target, element); + + if (! element) + { + element = (tHashTimerEntry *)calloc(sizeof(*element), 1); + element->target = target; + + HASH_ADD_PTR(_hashForTimers, target, element); + + // Is this the 1st element ? Then set the pause level to all the selectors of this target + element->paused = paused; + } + else + { + CCASSERT(element->paused == paused, ""); + } + + if (element->timers == nullptr) + { + element->timers = ccArrayNew(10); + } + else + { + for (int i = 0; i < element->timers->num; ++i) + { + TimerTargetSelector *timer = static_cast(element->timers->arr[i]); + + if (selector == timer->getSelector()) + { + CCLOG("CCScheduler#scheduleSelector. Selector already scheduled. Updating interval from: %.4f to %.4f", timer->getInterval(), interval); + timer->setInterval(interval); + return; + } + } + ccArrayEnsureExtraCapacity(element->timers, 1); + } + + TimerTargetSelector *timer = new TimerTargetSelector(); + timer->initWithSelector(selector, target, interval, repeat, delay); + ccArrayAppendObject(element->timers, timer); + timer->release(); } void Scheduler::scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, bool paused) { - target->retain(); - this->schedule([=](float dt){ - (target->*selector)(dt); - }, target, schedule_selector_to_key(selector), interval, paused); + this->scheduleSelector(selector, target, interval, kRepeatForever, 0.0f, paused); } -bool Scheduler::isScheduledForTarget(SEL_SCHEDULE selector, Ref *target) +bool Scheduler::isScheduledForSelector(SEL_SCHEDULE selector, Ref *target) { - return this->isScheduled(target, schedule_selector_to_key(selector)); + CCASSERT(selector, "Argument selector must be non-nullptr"); + CCASSERT(target, "Argument target must be non-nullptr"); + + tHashTimerEntry *element = nullptr; + HASH_FIND_PTR(_hashForTimers, &target, element); + + if (!element) + { + return false; + } + + if (element->timers == nullptr) + { + return false; + } + else + { + for (int i = 0; i < element->timers->num; ++i) + { + TimerTargetSelector *timer = static_cast(element->timers->arr[i]); + + if (selector == timer->getSelector()) + { + return true; + } + } + + return false; + } + + return false; // should never get here } void Scheduler::unscheduleSelector(SEL_SCHEDULE selector, Ref *target) { - this->unschedule(target, schedule_selector_to_key(selector)); - target->release(); + // explicity handle nil arguments when removing an object + if (target == nullptr || selector == nullptr) + { + return; + } + + //CCASSERT(target); + //CCASSERT(selector); + + tHashTimerEntry *element = nullptr; + HASH_FIND_PTR(_hashForTimers, &target, element); + + if (element) + { + for (int i = 0; i < element->timers->num; ++i) + { + TimerTargetSelector *timer = static_cast(element->timers->arr[i]); + + if (selector == timer->getSelector()) + { + if (timer == element->currentTimer && (! element->currentTimerSalvaged)) + { + element->currentTimer->retain(); + element->currentTimerSalvaged = true; + } + + ccArrayRemoveObjectAtIndex(element->timers, i, true); + + // update timerIndex in case we are in tick:, looping over the actions + if (element->timerIndex >= i) + { + element->timerIndex--; + } + + if (element->timers->num == 0) + { + if (_currentTarget == element) + { + _currentTargetSalvaged = true; + } + else + { + removeHashElement(element); + } + } + + return; + } + } + } } -void Scheduler::unscheduleUpdateForTarget(Ref *target) -{ - this->unscheduleUpdate(target); - target->release(); -}; - NS_CC_END diff --git a/cocos/2d/CCScheduler.h b/cocos/2d/CCScheduler.h index 6c4306d449..2a3d8fabdb 100644 --- a/cocos/2d/CCScheduler.h +++ b/cocos/2d/CCScheduler.h @@ -43,8 +43,6 @@ NS_CC_BEGIN * @{ */ -long schedule_selector_to_key(SEL_SCHEDULE selector); - typedef std::function ccSchedulerFunc; // // Timer @@ -53,46 +51,24 @@ typedef std::function ccSchedulerFunc; // class CC_DLL Timer : public Ref { +protected: + Timer(); public: - /** Allocates a timer with a target, a selector and an interval in seconds. */ - static Timer* create(const ccSchedulerFunc& callback, void *target, long key, float seconds = 0.0f); - -#if CC_ENABLE_SCRIPT_BINDING - /** Allocates a timer with a script callback function and an interval in seconds. - * @js NA - * @lua NA - */ - static Timer* createWithScriptHandler(int handler, float seconds); - - /** Initializes a timer with a script callback function and an interval in seconds. */ - bool initWithScriptHandler(int handler, float seconds); -#endif - - Timer(void); - - /** Initializes a timer with a target, a selector and an interval in seconds, repeat in number of times to repeat, delay in seconds. */ - bool initWithTarget(const ccSchedulerFunc& callback, void *target, long key, float seconds, unsigned int repeat, float delay); - /** get interval in seconds */ inline float getInterval() const { return _interval; }; /** set interval in seconds */ inline void setInterval(float interval) { _interval = interval; }; - /** - * @js NA - * @lua NA - */ - inline const ccSchedulerFunc& getCallback() const { return _callback; }; - inline long getKey() const { return _key; }; + + void setupTimerWithInterval(float seconds, unsigned int repeat, float delay); + + virtual void trigger() = 0; + virtual void cancel() = 0; /** triggers the timer */ void update(float dt); -#if CC_ENABLE_SCRIPT_BINDING - inline int getScriptHandler() const { return _scriptHandler; }; -#endif - protected: - void *_target; + float _elapsed; bool _runForever; bool _useDelay; @@ -100,13 +76,69 @@ protected: unsigned int _repeat; //0 = once, 1 is 2 x executed float _delay; float _interval; - ccSchedulerFunc _callback; - long _key; -#if CC_ENABLE_SCRIPT_BINDING - int _scriptHandler; -#endif }; + +class CC_DLL TimerTargetSelector : public Timer +{ +public: + TimerTargetSelector(); + + /** Initializes a timer with a target, a selector and an interval in seconds, repeat in number of times to repeat, delay in seconds. */ + bool initWithSelector(SEL_SCHEDULE selector, Ref* target, float seconds, unsigned int repeat, float delay); + + inline SEL_SCHEDULE getSelector() const { return _selector; }; + + virtual void trigger() override; + virtual void cancel() override; + +protected: + Ref* _target; + SEL_SCHEDULE _selector; +}; + + +class CC_DLL TimerTargetCallback : public Timer +{ +public: + TimerTargetCallback(); + + /** Initializes a timer with a target, a lambda and an interval in seconds, repeat in number of times to repeat, delay in seconds. */ + bool initWithLambda(const ccSchedulerFunc& callback, void *target, const std::string& key, float seconds, unsigned int repeat, float delay); + + /** + * @js NA + * @lua NA + */ + inline const ccSchedulerFunc& getCallback() const { return _callback; }; + inline const std::string& getKey() const { return _key; }; + + virtual void trigger() override; + virtual void cancel() override; + +protected: + void* _target; + ccSchedulerFunc _callback; + std::string _key; +}; + +#if CC_ENABLE_SCRIPT_BINDING + +class CC_DLL TimerScriptHandler : public Timer +{ +public: + bool initWithScriptHandler(int handler, float seconds); + inline int getScriptHandler() const { return _scriptHandler; }; + + virtual void trigger() override; + virtual void cancel() override; + +private: + int _scriptHandler; +}; + +#endif + // // Scheduler // @@ -145,7 +177,7 @@ public: * @js NA * @lua NA */ - ~Scheduler(void); + virtual ~Scheduler(); inline float getTimeScale() { return _timeScale; } /** Modifies the time of all scheduled callbacks. @@ -164,50 +196,39 @@ public: */ void update(float dt); + // schedule / unschedule 'callback'. Added from v3.0-final + /** The scheduled method will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. - If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. + If the 'callback' is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start - + @param key The key to identify the callback @since v3.0 */ - void schedule(const ccSchedulerFunc& callback, void *target, long key, float interval, unsigned int repeat, float delay, bool paused); + void scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, unsigned int repeat, float delay, bool paused); - /** calls scheduleSelector with kRepeatForever and a 0 delay */ - void schedule(const ccSchedulerFunc& callback, void *target, long key, float interval, bool paused); - - /** Schedules the 'update' selector for a given target with a given priority. - The 'update' selector will be called every frame. - The lower the priority, the earlier it is called. + /** Calls scheduleCallback with kRepeatForever and a 0 delay @since v3.0 */ - void scheduleUpdate(const ccSchedulerFunc& callback, void *target, int priority, bool paused); + void scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, bool paused); - /** Checks whether a selector for a given taget is scheduled. + /** Checks whether a callback associated with 'key' and 'target' is scheduled. @since v3.0.0 */ - bool isScheduled(void *target, long key); + bool isScheduledForKey(const std::string& key, void *target); - /** Unschedule a selector for a given target. - If you want to unschedule the "update", use unscheudleUpdateForTarget. + /** Unschedules a callback for a key and a given target. + If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate. @since v3.0 */ - void unschedule(void *target, long key); + void unscheduleCallbackForKey(const std::string& key, void *target); - /** Unschedules the update selector for a given target - @since v3.0 - */ - void unscheduleUpdate(void *target); - - /** Unschedules all selectors for a given target. - This also includes the "update" selector. - @since v3.0 - */ - void unscheduleAllForTarget(void *target); - - // OLD METHODS + ///////////////////////////////////// + + // schedule / unschedule 'selector' + /** The scheduled method will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. @@ -222,36 +243,59 @@ public: /** calls scheduleSelector with kRepeatForever and a 0 delay */ void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, bool paused); - template - void scheduleUpdateForTarget(T *target, int priority, bool paused) - { - target->retain(); - this->scheduleUpdate([=](float dt){ - target->update(dt); - }, target, priority, paused); - } - - /** Checks whether a selector for a given taget is scheduled. - @since v3.0.0 - */ - bool isScheduledForTarget(SEL_SCHEDULE selector, Ref *target); - /** Unschedule a selector for a given target. If you want to unschedule the "update", use unscheudleUpdateForTarget. @since v0.99.3 */ void unscheduleSelector(SEL_SCHEDULE selector, Ref *target); + /** Checks whether a selector for a given taget is scheduled. + @since v0.99.3 + */ + CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduledForSelector(selector, target); }; + + /** Checks whether a selector for a given taget is scheduled. + @since v3.0 + */ + bool isScheduledForSelector(SEL_SCHEDULE selector, Ref *target); + + ///////////////////////////////////// + + // schedule / unschedule 'update' + + /** Schedules the 'update' selector for a given target with a given priority. + The 'update' selector will be called every frame. + The lower the priority, the earlier it is called. + @since v0.99.3 + @lua NA + */ + template + void scheduleUpdateForTarget(T *target, int priority, bool paused) + { + this->scheduleCallbackPerFrame([target](float dt){ + target->update(dt); + }, target, priority, paused); + } + /** Unschedules the update selector for a given target @since v0.99.3 */ - void unscheduleUpdateForTarget(Ref *target); + void unscheduleUpdateForTarget(void *target); - /// + ///////////////////////////////////// + + // unschedule all + + /** Unschedules all selectors for a given target. + This also includes the "update" selector. + @since v0.99.3 + @js unscheduleCallbackForTarget + @lua NA + */ + void unscheduleAllForTarget(void *target); /** Unschedules all selectors from all targets. You should NEVER call this method, unless you know what you are doing. - @since v0.99.3 */ void unscheduleAll(void); @@ -262,6 +306,9 @@ public: */ void unscheduleAllWithMinPriority(int minPriority); + ///////////////////////////////////// + + // schedule / unschedule for script bindings #if CC_ENABLE_SCRIPT_BINDING /** The scheduled script callback will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. @@ -273,6 +320,9 @@ public: /** Unschedule a script entry. */ void unscheduleScriptEntry(unsigned int scheduleScriptEntryID); #endif + + ///////////////////////////////////// + /** Pauses the target. All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens. @@ -319,6 +369,15 @@ public: void performFunctionInCocosThread( const std::function &function); protected: + + /** Schedules the 'callback' function for a given target with a given priority. + The 'callback' selector will be called every frame. + The lower the priority, the earlier it is called. + @note This method is only for internal use. + @since v3.0 + */ + void scheduleCallbackPerFrame(const ccSchedulerFunc& callback, void *target, int priority, bool paused); + void removeHashElement(struct _hashSelectorEntry *element); void removeUpdateFromHash(struct _listEntry *entry); diff --git a/cocos/2d/CCScriptSupport.cpp b/cocos/2d/CCScriptSupport.cpp index 36ec7a2db8..78cd476547 100644 --- a/cocos/2d/CCScriptSupport.cpp +++ b/cocos/2d/CCScriptSupport.cpp @@ -74,10 +74,8 @@ SchedulerScriptHandlerEntry* SchedulerScriptHandlerEntry::create(int handler, fl bool SchedulerScriptHandlerEntry::init(float interval, bool paused) { - _timer = new Timer(); + _timer = new TimerScriptHandler(); _timer->initWithScriptHandler(_handler, interval); - _timer->autorelease(); - _timer->retain(); _paused = paused; LUALOG("[LUA] ADD script schedule: %d, entryID: %d", _handler, _entryId); return true; diff --git a/cocos/2d/CCScriptSupport.h b/cocos/2d/CCScriptSupport.h index aa49828ad5..ab0f002803 100644 --- a/cocos/2d/CCScriptSupport.h +++ b/cocos/2d/CCScriptSupport.h @@ -42,7 +42,7 @@ typedef struct lua_State lua_State; NS_CC_BEGIN -class Timer; +class TimerScriptHandler; class Layer; class MenuItem; class CallFunc; @@ -108,7 +108,7 @@ public: * @js NA * @lua NA */ - cocos2d::Timer* getTimer(void) { + TimerScriptHandler* getTimer(void) { return _timer; } /** @@ -143,7 +143,7 @@ private: } bool init(float interval, bool paused); - cocos2d::Timer* _timer; + TimerScriptHandler* _timer; bool _paused; bool _markedForDeletion; }; diff --git a/cocos/2d/CCTextureCache.cpp b/cocos/2d/CCTextureCache.cpp index e22f0645e8..aaa9ccfb4a 100644 --- a/cocos/2d/CCTextureCache.cpp +++ b/cocos/2d/CCTextureCache.cpp @@ -123,7 +123,7 @@ void TextureCache::addImageAsync(const std::string &path, std::functiongetScheduler()->schedule(CC_CALLBACK_1(TextureCache::addImageAsyncCallBack, this), this, schedule_selector_to_key(schedule_selector(TextureCache::addImageAsyncCallBack)), 0, false); + Director::getInstance()->getScheduler()->scheduleSelector(schedule_selector(TextureCache::addImageAsyncCallBack), this, 0, false); } ++_asyncRefCount; @@ -277,7 +277,7 @@ void TextureCache::addImageAsyncCallBack(float dt) --_asyncRefCount; if (0 == _asyncRefCount) { - Director::getInstance()->getScheduler()->unschedule(this, schedule_selector_to_key(schedule_selector(TextureCache::addImageAsyncCallBack))); + Director::getInstance()->getScheduler()->unscheduleSelector(schedule_selector(TextureCache::addImageAsyncCallBack), this); } } } diff --git a/tests/Classes/SchedulerTest/SchedulerTest.cpp b/tests/Classes/SchedulerTest/SchedulerTest.cpp index ec2dd5ece4..22ffdfe82a 100644 --- a/tests/Classes/SchedulerTest/SchedulerTest.cpp +++ b/tests/Classes/SchedulerTest/SchedulerTest.cpp @@ -27,7 +27,8 @@ static std::function createFunctions[] = { CL(SchedulerUpdateFromCustom), CL(RescheduleSelector), CL(SchedulerDelayAndRepeat), - CL(SchedulerIssue2268) + CL(SchedulerIssue2268), + CL(ScheduleCallbackTest) }; #define MAX_LAYER (sizeof(createFunctions) / sizeof(createFunctions[0])) @@ -430,9 +431,7 @@ void SchedulerUnscheduleAllHard::onExit() if(!_actionManagerActive) { // Restore the director's action manager. auto director = Director::getInstance(); - director->getScheduler()->scheduleUpdate([director](float dt){ - director->getActionManager()->update(dt); - }, director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); + director->getScheduler()->scheduleUpdateForTarget(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); } SchedulerTestLayer::onExit(); @@ -966,15 +965,11 @@ void TwoSchedulers::onEnter() // Create a new scheduler, and link it to the main scheduler sched1 = new Scheduler(); - defaultScheduler->scheduleUpdate([this](float dt){ - this->sched1->update(dt); - }, sched1, 0, false); + defaultScheduler->scheduleUpdateForTarget(sched1, 0, false); // Create a new ActionManager, and link it to the new scheudler actionManager1 = new ActionManager(); - sched1->scheduleUpdate([this](float dt){ - this->actionManager1->update(dt); - }, actionManager1, 0, false); + sched1->scheduleUpdateForTarget(actionManager1, 0, false); for( unsigned int i=0; i < 10; i++ ) { @@ -996,15 +991,11 @@ void TwoSchedulers::onEnter() // Create a new scheduler, and link it to the main scheduler sched2 = new Scheduler();; - defaultScheduler->scheduleUpdate([this](float dt){ - this->sched2->update(dt); - }, sched2, 0, false); + defaultScheduler->scheduleUpdateForTarget(sched2, 0, false); // Create a new ActionManager, and link it to the new scheudler actionManager2 = new ActionManager(); - sched2->scheduleUpdate([this](float dt){ - this->actionManager2->update(dt); - }, actionManager2, 0, false); + sched2->scheduleUpdateForTarget(actionManager2, 0, false); for( unsigned int i=0; i < 10; i++ ) { auto sprite = Sprite::create("Images/grossinis_sister2.png"); @@ -1112,6 +1103,51 @@ std::string SchedulerIssue2268::subtitle() const { return "Should not crash"; } + +// ScheduleCallbackTest + +ScheduleCallbackTest::~ScheduleCallbackTest() +{ + +} + +std::string ScheduleCallbackTest::title() const +{ + return "ScheduleCallbackTest"; +} + +std::string ScheduleCallbackTest::subtitle() const +{ + return "\n\n\n\nPlease see console.\n\ +scheduleCallback(lambda, ...)\n\ +scheduleCallback(CC_CALLBACK_1(XXX::member_function), this), this, ...)\n\ +scheduleCallback(global_function, ...)\n\ +"; +} + +static void ScheduleCallbackTest_global_callback(float dt) +{ + log("In the callback of scheduleCallback(global_function, ...), dt = %f", dt); +} + +void ScheduleCallbackTest::onEnter() +{ + SchedulerTestLayer::onEnter(); + + _scheduler->scheduleCallback([](float dt){ + log("In the callback of scheduleCallback(lambda, ...), dt = %f", dt); + }, this, "lambda", 1.0f, false); + + _scheduler->scheduleCallback(CC_CALLBACK_1(ScheduleCallbackTest::callback, this), this, "member_function", 1.0f, false); + + _scheduler->scheduleCallback(ScheduleCallbackTest_global_callback, this, "global_function", 1.0f, false); +} + +void ScheduleCallbackTest::callback(float dt) +{ + log("In the callback of scheduleCallback(CC_CALLBACK_1(XXX::member_function), this), this, ...), dt = %f", dt); +} + //------------------------------------------------------------------ // // SchedulerTestScene diff --git a/tests/Classes/SchedulerTest/SchedulerTest.h b/tests/Classes/SchedulerTest/SchedulerTest.h index f07ea8a730..57efb807a9 100644 --- a/tests/Classes/SchedulerTest/SchedulerTest.h +++ b/tests/Classes/SchedulerTest/SchedulerTest.h @@ -287,6 +287,21 @@ private: Node *testNode; }; +class ScheduleCallbackTest : public SchedulerTestLayer +{ +public: + CREATE_FUNC(ScheduleCallbackTest); + + ~ScheduleCallbackTest(); + virtual std::string title() const override; + virtual std::string subtitle() const override; + void onEnter(); + + void callback(float dt); + +private: +}; + class SchedulerTestScene : public TestScene { public: From 219ef6d8975da9f5e104f5afa09331a333ee0f4b Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Fri, 28 Feb 2014 22:08:01 -0800 Subject: [PATCH 44/69] removes CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP support It was never used. And it is slower. --- cocos/2d/CCTextureAtlas.cpp | 17 ----------------- cocos/2d/ccConfig.h | 11 ----------- 2 files changed, 28 deletions(-) diff --git a/cocos/2d/CCTextureAtlas.cpp b/cocos/2d/CCTextureAtlas.cpp index 5423d06eb0..a71ecf19f6 100644 --- a/cocos/2d/CCTextureAtlas.cpp +++ b/cocos/2d/CCTextureAtlas.cpp @@ -240,14 +240,6 @@ void TextureAtlas::setupIndices() for( int i=0; i < _capacity; i++) { -#if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP - _indices[i*6+0] = i*4+0; - _indices[i*6+1] = i*4+0; - _indices[i*6+2] = i*4+2; - _indices[i*6+3] = i*4+1; - _indices[i*6+4] = i*4+3; - _indices[i*6+5] = i*4+3; -#else _indices[i*6+0] = i*4+0; _indices[i*6+1] = i*4+1; _indices[i*6+2] = i*4+2; @@ -256,7 +248,6 @@ void TextureAtlas::setupIndices() _indices[i*6+3] = i*4+3; _indices[i*6+4] = i*4+2; _indices[i*6+5] = i*4+1; -#endif } } @@ -648,11 +639,7 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); #endif -#if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP - glDrawElements(GL_TRIANGLE_STRIP, (GLsizei) numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0])) ); -#else glDrawElements(GL_TRIANGLES, (GLsizei) numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0])) ); -#endif // CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP #if CC_REBIND_INDICES_BUFFER glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); @@ -689,11 +676,7 @@ void TextureAtlas::drawNumberOfQuads(ssize_t numberOfQuads, ssize_t start) glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, _buffersVBO[1]); -#if CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP - glDrawElements(GL_TRIANGLE_STRIP, (GLsizei)numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0]))); -#else glDrawElements(GL_TRIANGLES, (GLsizei)numberOfQuads*6, GL_UNSIGNED_SHORT, (GLvoid*) (start*6*sizeof(_indices[0]))); -#endif // CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP glBindBuffer(GL_ARRAY_BUFFER, 0); glBindBuffer(GL_ELEMENT_ARRAY_BUFFER, 0); diff --git a/cocos/2d/ccConfig.h b/cocos/2d/ccConfig.h index 44ca99e23c..d9f0b86af0 100644 --- a/cocos/2d/ccConfig.h +++ b/cocos/2d/ccConfig.h @@ -161,17 +161,6 @@ Only valid for cocos2d-mac. Not supported on cocos2d-ios. #define CC_SPRITEBATCHNODE_RENDER_SUBPIXEL 1 #endif -/** @def CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP - Use GL_TRIANGLE_STRIP instead of GL_TRIANGLES when rendering the texture atlas. - It seems it is the recommend way, but it is much slower, so, enable it at your own risk - - To enable set it to a value different than 0. Disabled by default. - - */ -#ifndef CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP -#define CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP 0 -#endif - /** @def CC_TEXTURE_ATLAS_USE_VAO By default, TextureAtlas (used by many cocos2d classes) will use VAO (Vertex Array Objects). Apple recommends its usage but they might consume a lot of memory, specially if you use many of them. From 4f90676e923a5ad69fcdbad9e3e2eaf77a9ae2d9 Mon Sep 17 00:00:00 2001 From: cai wenzhi Date: Sat, 1 Mar 2014 22:34:25 +0800 Subject: [PATCH 45/69] Add method for editor --- cocos/gui/UIButton.cpp | 20 +++++++++++++ cocos/gui/UIButton.h | 8 ++++++ cocos/gui/UIImageView.cpp | 10 +++++++ cocos/gui/UIImageView.h | 4 +++ cocos/gui/UILayout.cpp | 57 ++++++++++++++++++++++++++++++++++++++ cocos/gui/UILayout.h | 36 ++++++++++++++++++++++++ cocos/gui/UIListView.cpp | 5 ++++ cocos/gui/UIListView.h | 2 ++ cocos/gui/UILoadingBar.cpp | 10 +++++++ cocos/gui/UILoadingBar.h | 4 +++ cocos/gui/UIScrollView.cpp | 40 ++++++++++++++++++++++++++ cocos/gui/UIScrollView.h | 16 +++++++++++ cocos/gui/UISlider.cpp | 15 ++++++++++ cocos/gui/UISlider.h | 6 ++++ cocos/gui/UIText.cpp | 25 +++++++++++++++++ cocos/gui/UIText.h | 15 +++++++++- cocos/gui/UITextField.cpp | 25 +++++++++++++++++ cocos/gui/UITextField.h | 5 ++++ 18 files changed, 302 insertions(+), 1 deletion(-) diff --git a/cocos/gui/UIButton.cpp b/cocos/gui/UIButton.cpp index 82ed33dfec..3d08a6f2e3 100644 --- a/cocos/gui/UIButton.cpp +++ b/cocos/gui/UIButton.cpp @@ -152,6 +152,11 @@ void Button::setScale9Enabled(bool able) setCapInsetsDisabledRenderer(_capInsetsDisabled); setBright(_bright); } + +bool Button::isScale9Enabled() +{ + return _scale9Enabled; +} void Button::ignoreContentAdaptWithSize(bool ignore) { @@ -326,6 +331,11 @@ void Button::setCapInsetsNormalRenderer(const Rect &capInsets) } static_cast(_buttonNormalRenderer)->setCapInsets(capInsets); } + +const Rect& Button::getCapInsetsNormalRenderer() +{ + return _capInsetsNormal; +} void Button::setCapInsetsPressedRenderer(const Rect &capInsets) { @@ -336,6 +346,11 @@ void Button::setCapInsetsPressedRenderer(const Rect &capInsets) } static_cast(_buttonClickedRenderer)->setCapInsets(capInsets); } + +const Rect& Button::getCapInsetsPressedRenderer() +{ + return _capInsetsPressed; +} void Button::setCapInsetsDisabledRenderer(const Rect &capInsets) { @@ -346,6 +361,11 @@ void Button::setCapInsetsDisabledRenderer(const Rect &capInsets) } static_cast(_buttonDisableRenderer)->setCapInsets(capInsets); } + +const Rect& Button::getCapInsetsDisabledRenderer() +{ + return _capInsetsDisabled; +} void Button::onPressStateChangedToNormal() { diff --git a/cocos/gui/UIButton.h b/cocos/gui/UIButton.h index c2f7bf30a4..71f624d975 100644 --- a/cocos/gui/UIButton.h +++ b/cocos/gui/UIButton.h @@ -107,6 +107,8 @@ public: */ void setCapInsetsNormalRenderer(const Rect &capInsets); + const Rect& getCapInsetsNormalRenderer(); + /** * Sets capinsets for button, if button is using scale9 renderer. * @@ -114,6 +116,8 @@ public: */ void setCapInsetsPressedRenderer(const Rect &capInsets); + const Rect& getCapInsetsPressedRenderer(); + /** * Sets capinsets for button, if button is using scale9 renderer. * @@ -121,6 +125,8 @@ public: */ void setCapInsetsDisabledRenderer(const Rect &capInsets); + const Rect& getCapInsetsDisabledRenderer(); + //override "setAnchorPoint" of widget. virtual void setAnchorPoint(const Point &pt) override; @@ -131,6 +137,8 @@ public: */ virtual void setScale9Enabled(bool able); + bool isScale9Enabled(); + //override "setFlipX" of widget. virtual void setFlipX(bool flipX) override; diff --git a/cocos/gui/UIImageView.cpp b/cocos/gui/UIImageView.cpp index a77dee73e0..86be041024 100644 --- a/cocos/gui/UIImageView.cpp +++ b/cocos/gui/UIImageView.cpp @@ -206,6 +206,11 @@ void ImageView::setScale9Enabled(bool able) } setCapInsets(_capInsets); } + +bool ImageView::isScale9Enabled() +{ + return _scale9Enabled; +} void ImageView::ignoreContentAdaptWithSize(bool ignore) { @@ -226,6 +231,11 @@ void ImageView::setCapInsets(const Rect &capInsets) STATIC_CAST_SCALE9SPRITE->setCapInsets(capInsets); } +const Rect& ImageView::getCapInsets() +{ + return _capInsets; +} + void ImageView::setAnchorPoint(const Point &pt) { Widget::setAnchorPoint(pt); diff --git a/cocos/gui/UIImageView.h b/cocos/gui/UIImageView.h index df373a67a9..017dab5572 100644 --- a/cocos/gui/UIImageView.h +++ b/cocos/gui/UIImageView.h @@ -75,6 +75,8 @@ public: */ void setScale9Enabled(bool able); + bool isScale9Enabled(); + /** * Sets capinsets for imageview, if imageview is using scale9 renderer. * @@ -82,6 +84,8 @@ public: */ void setCapInsets(const Rect &capInsets); + const Rect& getCapInsets(); + //override "setFlipX" method of widget. virtual void setFlipX(bool flipX) override; diff --git a/cocos/gui/UILayout.cpp b/cocos/gui/UILayout.cpp index e72d105f30..82d01821e4 100644 --- a/cocos/gui/UILayout.cpp +++ b/cocos/gui/UILayout.cpp @@ -153,6 +153,23 @@ void Layout::addChild(Node *child, int zOrder, int tag) Widget::addChild(child, zOrder, tag); _doLayoutDirty = true; } + +void Layout::removeChild(Node *child, bool cleanup) +{ + Widget::removeChild(child, cleanup); + _doLayoutDirty = true; +} + +void Layout::removeAllChildren() +{ + Widget::removeAllChildren(); +} + +void Layout::removeAllChildrenWithCleanup(bool cleanup) +{ + Widget::removeAllChildrenWithCleanup(cleanup); + _doLayoutDirty = true; +} bool Layout::isClippingEnabled() { @@ -408,6 +425,11 @@ void Layout::setClippingType(LayoutClippingType type) setClippingEnabled(clippingEnabled); } +LayoutClippingType Layout::getClippingType() +{ + return _clippingType; +} + void Layout::setStencilClippingSize(const Size &size) { if (_clippingEnabled && _clippingType == LAYOUT_CLIPPING_STENCIL) @@ -620,6 +642,11 @@ void Layout::setBackGroundImageCapInsets(const Rect &capInsets) static_cast(_backGroundImage)->setCapInsets(capInsets); } } + +const Rect& Layout::getBackGroundImageCapInsets() +{ + return _backGroundImageCapInsets; +} void Layout::supplyTheLayoutParameterLackToChild(Widget *child) { @@ -747,6 +774,11 @@ void Layout::setBackGroundColorType(LayoutBackGroundColorType type) break; } } + +LayoutBackGroundColorType Layout::getBackGroundColorType() +{ + return _colorType; +} void Layout::setBackGroundColor(const Color3B &color) { @@ -756,6 +788,11 @@ void Layout::setBackGroundColor(const Color3B &color) _colorRender->setColor(color); } } + +const Color3B& Layout::getBackGroundColor() +{ + return _cColor; +} void Layout::setBackGroundColor(const Color3B &startColor, const Color3B &endColor) { @@ -770,6 +807,16 @@ void Layout::setBackGroundColor(const Color3B &startColor, const Color3B &endCol _gradientRender->setEndColor(endColor); } } + +const Color3B& Layout::getBackGroundStartColor() +{ + return _gStartColor; +} + +const Color3B& Layout::getBackGroundEndColor() +{ + return _gEndColor; +} void Layout::setBackGroundColorOpacity(int opacity) { @@ -788,6 +835,11 @@ void Layout::setBackGroundColorOpacity(int opacity) break; } } + +int Layout::getBackGroundColorOpacity() +{ + return _cOpacity; +} void Layout::setBackGroundColorVector(const Point &vector) { @@ -797,6 +849,11 @@ void Layout::setBackGroundColorVector(const Point &vector) _gradientRender->setVector(vector); } } + +const Point& Layout::getBackGroundColorVector() +{ + return _alongVector; +} const Size& Layout::getBackGroundImageTextureSize() const { diff --git a/cocos/gui/UILayout.h b/cocos/gui/UILayout.h index 13f7ac1e36..8d876d86e1 100644 --- a/cocos/gui/UILayout.h +++ b/cocos/gui/UILayout.h @@ -91,6 +91,8 @@ public: */ void setBackGroundImageCapInsets(const Rect& capInsets); + const Rect& getBackGroundImageCapInsets(); + /** * Sets Color Type for layout. * @@ -98,6 +100,8 @@ public: */ void setBackGroundColorType(LayoutBackGroundColorType type); + LayoutBackGroundColorType getBackGroundColorType(); + /** * Sets background iamge use scale9 renderer. * @@ -105,6 +109,8 @@ public: */ void setBackGroundImageScale9Enabled(bool enabled); + bool isBackGroundImageScale9Enabled(); + /** * Sets background color for layout, if color type is LAYOUT_COLOR_SOLID * @@ -112,6 +118,8 @@ public: */ void setBackGroundColor(const Color3B &color); + const Color3B& getBackGroundColor(); + /** * Sets background color for layout, if color type is LAYOUT_COLOR_GRADIENT * @@ -121,6 +129,10 @@ public: */ void setBackGroundColor(const Color3B &startColor, const Color3B &endColor); + const Color3B& getBackGroundStartColor(); + + const Color3B& getBackGroundEndColor(); + /** * Sets background opacity layout. * @@ -128,6 +140,8 @@ public: */ void setBackGroundColorOpacity(int opacity); + int getBackGroundColorOpacity(); + /** * Sets background color vector for layout, if color type is LAYOUT_COLOR_GRADIENT * @@ -135,6 +149,8 @@ public: */ void setBackGroundColorVector(const Point &vector); + const Point& getBackGroundColorVector(); + /** * Remove the background image of layout. */ @@ -158,6 +174,8 @@ public: void setClippingType(LayoutClippingType type); + LayoutClippingType getClippingType(); + /** * Gets if layout is clipping enabled. * @@ -209,6 +227,24 @@ public: */ virtual void addChild(Node* child, int zOrder, int tag) override; + virtual void removeChild(Node* child, bool cleanup = true) override; + + /** + * Removes all children from the container with a cleanup. + * + * @see `removeAllChildrenWithCleanup(bool)` + */ + virtual void removeAllChildren() override; + /** + * Removes all children from the container, and do a cleanup to all running actions depending on the cleanup parameter. + * + * @param cleanup true if all running actions on all children nodes should be cleanup, false oterwise. + * @js removeAllChildren + * @lua removeAllChildren + */ + virtual void removeAllChildrenWithCleanup(bool cleanup) override; + + virtual void visit(); virtual void sortAllChildren() override; diff --git a/cocos/gui/UIListView.cpp b/cocos/gui/UIListView.cpp index 8c732f6e70..a447f46bbe 100644 --- a/cocos/gui/UIListView.cpp +++ b/cocos/gui/UIListView.cpp @@ -347,6 +347,11 @@ void ListView::setItemsMargin(float margin) _itemsMargin = margin; _refreshViewDirty = true; } + +float ListView::getItemsMargin() +{ + return _itemsMargin; +} void ListView::setDirection(SCROLLVIEW_DIR dir) { diff --git a/cocos/gui/UIListView.h b/cocos/gui/UIListView.h index 2a6b2df848..3458b5fd48 100644 --- a/cocos/gui/UIListView.h +++ b/cocos/gui/UIListView.h @@ -150,6 +150,8 @@ public: */ void setItemsMargin(float margin); + float getItemsMargin(); + virtual void sortAllChildren() override; ssize_t getCurSelectedIndex() const; diff --git a/cocos/gui/UILoadingBar.cpp b/cocos/gui/UILoadingBar.cpp index 15ade85aef..542b3fa016 100644 --- a/cocos/gui/UILoadingBar.cpp +++ b/cocos/gui/UILoadingBar.cpp @@ -196,6 +196,11 @@ void LoadingBar::setScale9Enabled(bool enabled) setCapInsets(_capInsets); } +bool LoadingBar::isScale9Enabled() +{ + return _scale9Enabled; +} + void LoadingBar::setCapInsets(const Rect &capInsets) { _capInsets = capInsets; @@ -206,6 +211,11 @@ void LoadingBar::setCapInsets(const Rect &capInsets) static_cast(_barRenderer)->setCapInsets(capInsets); } +const Rect& LoadingBar::getCapInsets() +{ + return _capInsets; +} + void LoadingBar::setPercent(int percent) { if ( percent < 0 || percent > 100) diff --git a/cocos/gui/UILoadingBar.h b/cocos/gui/UILoadingBar.h index b0305951d5..d8b69aa83a 100644 --- a/cocos/gui/UILoadingBar.h +++ b/cocos/gui/UILoadingBar.h @@ -106,6 +106,8 @@ public: */ void setScale9Enabled(bool enabled); + bool isScale9Enabled(); + /** * Sets capinsets for loadingbar, if loadingbar is using scale9 renderer. * @@ -113,6 +115,8 @@ public: */ void setCapInsets(const Rect &capInsets); + const Rect& getCapInsets(); + //override "ignoreContentAdaptWithSize" method of widget. virtual void ignoreContentAdaptWithSize(bool ignore) override; diff --git a/cocos/gui/UIScrollView.cpp b/cocos/gui/UIScrollView.cpp index 8bb23aae8d..553491d408 100644 --- a/cocos/gui/UIScrollView.cpp +++ b/cocos/gui/UIScrollView.cpp @@ -273,6 +273,46 @@ Widget* ScrollView::getChildByName(const char *name) { return _innerContainer->getChildByName(name); } + +void ScrollView::addNode(Node* node) +{ + Layout::addNode(node); +} + +void ScrollView::addNode(Node * node, int zOrder) +{ + Layout::addNode(node, zOrder); +} + +void ScrollView::addNode(Node* node, int zOrder, int tag) +{ + _innerContainer->addNode(node, zOrder, tag); +} + +Node* ScrollView::getNodeByTag(int tag) +{ + return _innerContainer->getNodeByTag(tag); +} + +Vector& ScrollView::getNodes() +{ + return _innerContainer->getNodes(); +} + +void ScrollView::removeNode(Node* node) +{ + _innerContainer->removeNode(node); +} + +void ScrollView::removeNodeByTag(int tag) +{ + _innerContainer->removeNodeByTag(tag); +} + +void ScrollView::removeAllNodes() +{ + _innerContainer->removeAllNodes(); +} void ScrollView::moveChildren(float offsetX, float offsetY) { diff --git a/cocos/gui/UIScrollView.h b/cocos/gui/UIScrollView.h index 0b196cef55..6cb3a554fc 100644 --- a/cocos/gui/UIScrollView.h +++ b/cocos/gui/UIScrollView.h @@ -274,6 +274,22 @@ public: virtual Widget* getChildByName(const char* name) override; + virtual void addNode(Node* node) override; + + virtual void addNode(Node * node, int zOrder) override; + + virtual void addNode(Node* node, int zOrder, int tag) override; + + virtual Node * getNodeByTag(int tag) override; + + virtual Vector& getNodes() override; + + virtual void removeNode(Node* node) override; + + virtual void removeNodeByTag(int tag) override; + + virtual void removeAllNodes() override; + virtual bool onTouchBegan(Touch *touch, Event *unusedEvent) override; virtual void onTouchMoved(Touch *touch, Event *unusedEvent) override; virtual void onTouchEnded(Touch *touch, Event *unusedEvent) override; diff --git a/cocos/gui/UISlider.cpp b/cocos/gui/UISlider.cpp index d138def5a3..e5557b6cbf 100644 --- a/cocos/gui/UISlider.cpp +++ b/cocos/gui/UISlider.cpp @@ -216,6 +216,11 @@ void Slider::setScale9Enabled(bool able) setCapInsetsBarRenderer(_capInsetsBarRenderer); setCapInsetProgressBarRebderer(_capInsetsProgressBarRenderer); } + +bool Slider::isScale9Enabled() +{ + return _scale9Enabled; +} void Slider::ignoreContentAdaptWithSize(bool ignore) { @@ -241,6 +246,11 @@ void Slider::setCapInsetsBarRenderer(const Rect &capInsets) } static_cast(_barRenderer)->setCapInsets(capInsets); } + +const Rect& Slider::getCapInsetsBarRenderer() +{ + return _capInsetsBarRenderer; +} void Slider::setCapInsetProgressBarRebderer(const Rect &capInsets) { @@ -251,6 +261,11 @@ void Slider::setCapInsetProgressBarRebderer(const Rect &capInsets) } static_cast(_progressBarRenderer)->setCapInsets(capInsets); } + +const Rect& Slider::getCapInsetsProgressBarRebderer() +{ + return _capInsetsProgressBarRenderer; +} void Slider::loadSlidBallTextures(const char* normal,const char* pressed,const char* disabled,TextureResType texType) { diff --git a/cocos/gui/UISlider.h b/cocos/gui/UISlider.h index bc952ede15..9f2f175200 100644 --- a/cocos/gui/UISlider.h +++ b/cocos/gui/UISlider.h @@ -77,6 +77,8 @@ public: */ void setScale9Enabled(bool able); + bool isScale9Enabled(); + /** * Sets capinsets for slider, if slider is using scale9 renderer. * @@ -91,6 +93,8 @@ public: */ void setCapInsetsBarRenderer(const Rect &capInsets); + const Rect& getCapInsetsBarRenderer(); + /** * Sets capinsets for slider, if slider is using scale9 renderer. * @@ -98,6 +102,8 @@ public: */ void setCapInsetProgressBarRebderer(const Rect &capInsets); + const Rect& getCapInsetsProgressBarRebderer(); + /** * Load textures for slider ball. * diff --git a/cocos/gui/UIText.cpp b/cocos/gui/UIText.cpp index 13b014fe66..274b28b140 100644 --- a/cocos/gui/UIText.cpp +++ b/cocos/gui/UIText.cpp @@ -98,6 +98,11 @@ void Text::setFontSize(int size) _labelRenderer->setFontSize(size); labelScaleChangedWithSize(); } + +int Text::getFontSize() +{ + return _fontSize; +} void Text::setFontName(const std::string& name) { @@ -105,24 +110,44 @@ void Text::setFontName(const std::string& name) _labelRenderer->setFontName(name); labelScaleChangedWithSize(); } + +const std::string& Text::getFontName() +{ + return _fontName; +} void Text::setTextAreaSize(const Size &size) { _labelRenderer->setDimensions(size); labelScaleChangedWithSize(); } + +const Size& Text::getTextAreaSize() +{ + return _labelRenderer->getDimensions(); +} void Text::setTextHorizontalAlignment(TextHAlignment alignment) { _labelRenderer->setHorizontalAlignment(alignment); labelScaleChangedWithSize(); } + +TextHAlignment Text::getTextHorizontalAlignment() +{ + return _labelRenderer->getHorizontalAlignment(); +} void Text::setTextVerticalAlignment(TextVAlignment alignment) { _labelRenderer->setVerticalAlignment(alignment); labelScaleChangedWithSize(); } + +TextVAlignment Text::getTextVerticalAlignment() +{ + return _labelRenderer->getVerticalAlignment(); +} void Text::setTouchScaleChangeEnabled(bool enable) { diff --git a/cocos/gui/UIText.h b/cocos/gui/UIText.h index 44d558151a..03dc895727 100644 --- a/cocos/gui/UIText.h +++ b/cocos/gui/UIText.h @@ -81,6 +81,8 @@ public: */ void setFontSize(int size); + int getFontSize(); + /** * Sets the font name of label. * @@ -88,6 +90,8 @@ public: */ void setFontName(const std::string& name); + const std::string& getFontName(); + /** * Sets the touch scale enabled of label. * @@ -157,8 +161,17 @@ public: virtual std::string getDescription() const override; void setTextAreaSize(const Size &size); + + const Size& getTextAreaSize(); + void setTextHorizontalAlignment(TextHAlignment alignment); - void setTextVerticalAlignment(TextVAlignment alignment); + + TextHAlignment getTextHorizontalAlignment(); + + void setTextVerticalAlignment(TextVAlignment alignment); + + TextVAlignment getTextVerticalAlignment(); + protected: virtual bool init() override; virtual void initRenderer() override; diff --git a/cocos/gui/UITextField.cpp b/cocos/gui/UITextField.cpp index c463293006..23fffb831e 100644 --- a/cocos/gui/UITextField.cpp +++ b/cocos/gui/UITextField.cpp @@ -319,6 +319,11 @@ void TextField::setTouchSize(const Size &size) _touchWidth = size.width; _touchHeight = size.height; } + +Size TextField::getTouchSize() +{ + return Size(_touchWidth, _touchHeight); +} void TextField::setText(const std::string& text) { @@ -345,18 +350,33 @@ void TextField::setPlaceHolder(const std::string& value) _textFieldRenderer->setPlaceHolder(value); textfieldRendererScaleChangedWithSize(); } + +const std::string& TextField::getPlaceHolder() +{ + return _textFieldRenderer->getPlaceHolder(); +} void TextField::setFontSize(int size) { _textFieldRenderer->setFontSize(size); textfieldRendererScaleChangedWithSize(); } + +int TextField::getFontSize() +{ + return _textFieldRenderer->getFontSize(); +} void TextField::setFontName(const std::string& name) { _textFieldRenderer->setFontName(name); textfieldRendererScaleChangedWithSize(); } + +const std::string& TextField::getFontName() +{ + return _textFieldRenderer->getFontName(); +} void TextField::didNotSelectSelf() { @@ -414,6 +434,11 @@ void TextField::setPasswordStyleText(const char *styleText) _passwordStyleText = styleText; } + +const char* TextField::getPasswordStyleText() +{ + return _passwordStyleText.c_str(); +} void TextField::update(float dt) { diff --git a/cocos/gui/UITextField.h b/cocos/gui/UITextField.h index 1f01103592..1fc3d2cc0b 100644 --- a/cocos/gui/UITextField.h +++ b/cocos/gui/UITextField.h @@ -108,10 +108,14 @@ public: virtual ~TextField(); static TextField* create(); void setTouchSize(const Size &size); + Size getTouchSize(); void setText(const std::string& text); void setPlaceHolder(const std::string& value); + const std::string& getPlaceHolder(); void setFontSize(int size); + int getFontSize(); void setFontName(const std::string& name); + const std::string& getFontName(); virtual void didNotSelectSelf(); const std::string& getStringValue(); virtual bool onTouchBegan(Touch *touch, Event *unusedEvent) override; @@ -122,6 +126,7 @@ public: void setPasswordEnabled(bool enable); bool isPasswordEnabled(); void setPasswordStyleText(const char* styleText); + const char* getPasswordStyleText(); virtual void update(float dt) override; bool getAttachWithIME(); void setAttachWithIME(bool attach); From cdc19eea1c91bc6b219434103abd1abfdb0b8926 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Sat, 1 Mar 2014 08:26:54 -0800 Subject: [PATCH 46/69] Nodes: setAdditionalTransform() receives a pointer and not a const reference. If the pointer is `NULL`, then it won't use the additionalTransform --- CHANGELOG | 3 ++ cocos/2d/CCActionCamera.cpp | 2 +- cocos/2d/CCNode.cpp | 16 ++++--- cocos/2d/CCNode.h | 46 +------------------ cocos/2d/CCTransition.cpp | 7 +-- .../cocostudio/CCDisplayFactory.cpp | 3 +- tests/Classes/NodeTest/NodeTest.cpp | 4 +- 7 files changed, 22 insertions(+), 59 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index be1918594a..e2dd788f49 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ cocos2d-x-3.0rc0 Feb.?? 2014 [NEW] Action: RotateBy supports 3D rotations [NEW] Bindings: Using python to automatically generate script bindings [NEW] Bindings: Added JS bindings support for Linux + [NEW] ccConfig.h: removed support for CC_TEXTURE_ATLAS_USE_TRIANGLE_STRIP [NEW] Console: Added 'resolution', 'projection' commands. Improved API [NEW] Console: Added more commands: director resume|pause|stopanimation|startanimation. [NEW] Console: Added command: 'touch tap|swipe' to simulating touch events. @@ -48,6 +49,8 @@ cocos2d-x-3.0rc0 Feb.?? 2014 [FIX] EGLView improvements: renamed to GLView, no longer a singleton, easier to customize [FIX] Removes samples except testcpp|testjavascript|testlua. Moves sample games to `cocos2d/samples` repo. [FIX] cc.BuilderReader.load( path, null, parentSize ); was not allowed. + [FIX] Node: setAdditionalTransform receives a pointer and not a const reference + cocos2d-x-3.0beta2 Jan.24 2014 [All] diff --git a/cocos/2d/CCActionCamera.cpp b/cocos/2d/CCActionCamera.cpp index 45560f7ede..b11f6e40cd 100644 --- a/cocos/2d/CCActionCamera.cpp +++ b/cocos/2d/CCActionCamera.cpp @@ -122,7 +122,7 @@ void ActionCamera::updateTransform() // But that operation needs to be done after all the 'updates'. // So the Director should emit an 'director_after_update' event. // And this object should listen to it - _target->setAdditionalTransform(mv); + _target->setAdditionalTransform(&mv); } // diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index ff3c938ed9..57dbdd415a 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1361,16 +1361,20 @@ void Node::setNodeToParentTransform(const kmMat4& transform) void Node::setAdditionalTransform(const AffineTransform& additionalTransform) { - CGAffineToGL(additionalTransform, _additionalTransform.mat); - _transformUpdated = _transformDirty = _inverseDirty = true; - _useAdditionalTransform = true; + kmMat4 tmp; + CGAffineToGL(additionalTransform, tmp.mat); + setAdditionalTransform(&tmp); } -void Node::setAdditionalTransform(const kmMat4& additionalTransform) +void Node::setAdditionalTransform(kmMat4* additionalTransform) { - _additionalTransform = additionalTransform; + if(additionalTransform == nullptr) { + _useAdditionalTransform = false; + } else { + _additionalTransform = *additionalTransform; + _useAdditionalTransform = true; + } _transformUpdated = _transformDirty = _inverseDirty = true; - _useAdditionalTransform = true; } diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index 312615ef5c..7e13a8fb1d 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -1347,54 +1347,12 @@ public: /** * Sets an additional transform matrix to the node. * - * In order to remove it, set the Identity Matrix to the additional transform. + * In order to remove it, call it again with the argument `nullptr` * * @note The additional transform will be concatenated at the end of getNodeToParentTransform. * It could be used to simulate `parent-child` relationship between two nodes (e.g. one is in BatchNode, another isn't). - @code - // create a batchNode - SpriteBatchNode* batch= SpriteBatchNode::create("Icon-114.png"); - this->addChild(batch); - - // create two sprites, spriteA will be added to batchNode, they are using different textures. - Sprite* spriteA = Sprite::createWithTexture(batch->getTexture()); - Sprite* spriteB = Sprite::create("Icon-72.png"); - - batch->addChild(spriteA); - - // We can't make spriteB as spriteA's child since they use different textures. So just add it to layer. - // But we want to simulate `parent-child` relationship for these two node. - this->addChild(spriteB); - - //position - spriteA->setPosition(Point(200, 200)); - - // Gets the spriteA's transform. - auto t = spriteA->getNodeToParentTransform(); - - // Sets the additional transform to spriteB, spriteB's postion will based on its pseudo parent i.e. spriteA. - spriteB->setAdditionalTransform(t); - - //scale - spriteA->setScale(2); - - // Gets the spriteA's transform. - t = spriteA->getNodeToParentTransform(); - - // Sets the additional transform to spriteB, spriteB's scale will based on its pseudo parent i.e. spriteA. - spriteB->setAdditionalTransform(t); - - //rotation - spriteA->setRotation(20); - - // Gets the spriteA's transform. - t = spriteA->getNodeToParentTransform(); - - // Sets the additional transform to spriteB, spriteB's rotation will based on its pseudo parent i.e. spriteA. - spriteB->setAdditionalTransform(t); - @endcode */ - void setAdditionalTransform(const kmMat4& additionalTransform); + void setAdditionalTransform(kmMat4* additionalTransform); void setAdditionalTransform(const AffineTransform& additionalTransform); /// @} end of Coordinate Converters diff --git a/cocos/2d/CCTransition.cpp b/cocos/2d/CCTransition.cpp index 7344a28306..0777474369 100644 --- a/cocos/2d/CCTransition.cpp +++ b/cocos/2d/CCTransition.cpp @@ -112,21 +112,18 @@ void TransitionScene::draw(Renderer *renderer, const kmMat4 &transform, bool tra void TransitionScene::finish() { - kmMat4 identity; - kmMat4Identity(&identity); - // clean up _inScene->setVisible(true); _inScene->setPosition(Point(0,0)); _inScene->setScale(1.0f); _inScene->setRotation(0.0f); - _inScene->setAdditionalTransform(identity); + _inScene->setAdditionalTransform(nullptr); _outScene->setVisible(false); _outScene->setPosition(Point(0,0)); _outScene->setScale(1.0f); _outScene->setRotation(0.0f); - _outScene->setAdditionalTransform(identity); + _outScene->setAdditionalTransform(nullptr); //[self schedule:@selector(setNewScene:) interval:0]; this->schedule(schedule_selector(TransitionScene::setNewScene), 0); diff --git a/cocos/editor-support/cocostudio/CCDisplayFactory.cpp b/cocos/editor-support/cocostudio/CCDisplayFactory.cpp index 72428edfff..d3f894cf42 100644 --- a/cocos/editor-support/cocostudio/CCDisplayFactory.cpp +++ b/cocos/editor-support/cocostudio/CCDisplayFactory.cpp @@ -93,7 +93,8 @@ void DisplayFactory::updateDisplay(Bone *bone, float dt, bool dirty) break; default: { - display->setAdditionalTransform(bone->getNodeToArmatureTransform()); + kmMat4 transform = bone->getNodeToArmatureTransform(); + display->setAdditionalTransform(&transform); } break; } diff --git a/tests/Classes/NodeTest/NodeTest.cpp b/tests/Classes/NodeTest/NodeTest.cpp index 900de637a2..27dcc0f6ce 100644 --- a/tests/Classes/NodeTest/NodeTest.cpp +++ b/tests/Classes/NodeTest/NodeTest.cpp @@ -1107,8 +1107,8 @@ CameraTest2::CameraTest2() kmMat4 lookupMatrix; kmMat4LookAt(&lookupMatrix, &eye, ¢er, &up); - _sprite1->setAdditionalTransform(lookupMatrix); - _sprite2->setAdditionalTransform(lookupMatrix); + _sprite1->setAdditionalTransform(&lookupMatrix); + _sprite2->setAdditionalTransform(&lookupMatrix); } From 30d7130eb02603e3431c586d872cbc3ea7b9688d Mon Sep 17 00:00:00 2001 From: James Chen Date: Sun, 2 Mar 2014 16:16:03 +0800 Subject: [PATCH 47/69] closed #4160: Out of range exception in EventDispatcher --- cocos/2d/CCEventDispatcher.cpp | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index 13b4b35224..ccdb174725 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -479,9 +479,18 @@ void EventDispatcher::removeEventListener(EventListener* listener) auto sceneGraphPriorityListeners = listeners->getSceneGraphPriorityListeners(); removeListenerInVector(sceneGraphPriorityListeners); - if (!isFound) + if (isFound) + { + // fixed #4160: Dirty flag need to be updated after listeners were removed. + setDirty(listener->getListenerID(), DirtyFlag::SCENE_GRAPH_PRIORITY); + } + else { removeListenerInVector(fixedPriorityListeners); + if (isFound) + { + setDirty(listener->getListenerID(), DirtyFlag::FIXED_PRIORITY); + } } if (iter->second->empty()) @@ -554,14 +563,18 @@ void EventDispatcher::dispatchEventToListeners(EventListenerVector* listeners, s // priority < 0 if (fixedPriorityListeners) { - bool isEmpty = fixedPriorityListeners->empty(); - for (; !isEmpty && i < listeners->getGt0Index(); ++i) + CCASSERT(listeners->getGt0Index() <= fixedPriorityListeners->size(), "Out of range exception!"); + + if (!fixedPriorityListeners->empty()) { - auto l = fixedPriorityListeners->at(i); - if (!l->isPaused() && l->isRegistered() && onEvent(l)) + for (; i < listeners->getGt0Index(); ++i) { - shouldStopPropagation = true; - break; + auto l = fixedPriorityListeners->at(i); + if (!l->isPaused() && l->isRegistered() && onEvent(l)) + { + shouldStopPropagation = true; + break; + } } } } @@ -1082,12 +1095,15 @@ void EventDispatcher::removeEventListenersForListenerID(const EventListener::Lis removeAllListenersInVector(sceneGraphPriorityListeners); removeAllListenersInVector(fixedPriorityListeners); + // Remove the dirty flag according the 'listenerID'. + // No need to check whether the dispatcher is dispatching event. + _priorityDirtyFlagMap.erase(listenerID); + if (!_inDispatch) { listeners->clear(); delete listeners; _listenerMap.erase(listenerItemIter); - _priorityDirtyFlagMap.erase(listenerID); } } From 23f15ed9b547866e39d511af3dab3cd638cfa73b Mon Sep 17 00:00:00 2001 From: James Chen Date: Sun, 2 Mar 2014 16:22:57 +0800 Subject: [PATCH 48/69] closed #4160: Adds test case for issue 4160. --- .../NewEventDispatcherTest.cpp | 70 ++++++++++++++----- .../NewEventDispatcherTest.h | 12 ++++ 2 files changed, 66 insertions(+), 16 deletions(-) diff --git a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index c9f1f403d3..2464d7b40f 100644 --- a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -25,6 +25,7 @@ std::function createFunctions[] = CL(GlobalZTouchTest), CL(StopPropagationTest), CL(Issue4129), + CL(Issue4160) }; unsigned int TEST_CASE_COUNT = sizeof(createFunctions) / sizeof(createFunctions[0]); @@ -231,12 +232,11 @@ public: TouchableSpriteWithFixedPriority() : _listener(nullptr) , _fixedPriority(0) - , _useNodePriority(false) + , _removeListenerOnTouchEnded(false) { } - void setPriority(int fixedPriority) { _fixedPriority = fixedPriority; _useNodePriority = false; }; - void setPriorityWithThis(bool useNodePriority) { _useNodePriority = useNodePriority; _fixedPriority = true; } + void setPriority(int fixedPriority) { _fixedPriority = fixedPriority; }; void onEnter() override { @@ -259,22 +259,17 @@ public: return false; }; - listener->onTouchMoved = [=](Touch* touch, Event* event){ - //this->setPosition(this->getPosition() + touch->getDelta()); - }; - listener->onTouchEnded = [=](Touch* touch, Event* event){ this->setColor(Color3B::WHITE); + + if (_removeListenerOnTouchEnded) + { + _eventDispatcher->removeEventListener(listener); + } }; - if (_useNodePriority) - { - _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); - } - else - { - _eventDispatcher->addEventListenerWithFixedPriority(listener, _fixedPriority); - } + _eventDispatcher->addEventListenerWithFixedPriority(listener, _fixedPriority); + _listener = listener; } @@ -285,10 +280,12 @@ public: Sprite::onExit(); } + void removeListenerOnTouchEnded(bool toRemove) { _removeListenerOnTouchEnded = toRemove; }; + private: EventListener* _listener; int _fixedPriority; - bool _useNodePriority; + bool _removeListenerOnTouchEnded; }; void FixedPriorityTest::onEnter() @@ -1090,6 +1087,7 @@ std::string StopPropagationTest::subtitle() const return "Shouldn't crash and only blue block could be clicked"; } +// Issue4129 Issue4129::Issue4129() : _bugFixed(false) { @@ -1152,3 +1150,43 @@ std::string Issue4129::subtitle() const { return "Should see 'Yeah, this issue was fixed.'"; } + +// Issue4160 +Issue4160::Issue4160() +{ + Point origin = Director::getInstance()->getVisibleOrigin(); + Size size = Director::getInstance()->getVisibleSize(); + + auto sprite1 = TouchableSpriteWithFixedPriority::create(); + sprite1->setTexture("Images/CyanSquare.png"); + sprite1->setPriority(-30); + sprite1->setPosition(origin+Point(size.width/2, size.height/2) + Point(-80, 40)); + addChild(sprite1, -10); + + auto sprite2 = TouchableSpriteWithFixedPriority::create(); + sprite2->setTexture("Images/MagentaSquare.png"); + sprite2->setPriority(-20); + sprite2->removeListenerOnTouchEnded(true); + sprite2->setPosition(origin+Point(size.width/2, size.height/2)); + addChild(sprite2, -20); + + auto sprite3 = TouchableSpriteWithFixedPriority::create(); + sprite3->setTexture("Images/YellowSquare.png"); + sprite3->setPriority(-10); + sprite3->setPosition(Point(0, 0)); + sprite2->addChild(sprite3, -1); +} + +Issue4160::~Issue4160() +{ +} + +std::string Issue4160::title() const +{ + return "Issue 4160: Out of range exception"; +} + +std::string Issue4160::subtitle() const +{ + return "Touch the red block twice \n should not crash and the red one couldn't be touched"; +} diff --git a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h index 90b48bf22d..4392998358 100644 --- a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h +++ b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h @@ -180,5 +180,17 @@ private: bool _bugFixed; }; +class Issue4160 : public EventDispatcherTestDemo +{ +public: + CREATE_FUNC(Issue4160); + Issue4160(); + virtual ~Issue4160(); + + virtual std::string title() const override; + virtual std::string subtitle() const override; + +private: +}; #endif /* defined(__samples__NewEventDispatcherTest__) */ From f3949e078b4a08807ee449f09d100d8a6d05f193 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sun, 2 Mar 2014 15:54:36 +0800 Subject: [PATCH 49/69] [EventDispatcher] Adds 'pauseEventListenersForTarget', 'resumeEventListenersForTarget' and 'removeEventListenersForTarget'. --- cocos/2d/CCEventDispatcher.cpp | 51 ++++++-- cocos/2d/CCEventDispatcher.h | 40 ++++-- cocos/2d/CCNode.cpp | 8 +- .../NewEventDispatcherTest.cpp | 123 ++++++++++++++---- .../NewEventDispatcherTest.h | 13 ++ 5 files changed, 185 insertions(+), 50 deletions(-) diff --git a/cocos/2d/CCEventDispatcher.cpp b/cocos/2d/CCEventDispatcher.cpp index ccdb174725..10776fbe20 100644 --- a/cocos/2d/CCEventDispatcher.cpp +++ b/cocos/2d/CCEventDispatcher.cpp @@ -267,9 +267,9 @@ void EventDispatcher::visitTarget(Node* node, bool isRootNode) } } -void EventDispatcher::pauseTarget(Node* node) +void EventDispatcher::pauseEventListenersForTarget(Node* target, bool recursive/* = false */) { - auto listenerIter = _nodeListenersMap.find(node); + auto listenerIter = _nodeListenersMap.find(target); if (listenerIter != _nodeListenersMap.end()) { auto listeners = listenerIter->second; @@ -278,11 +278,20 @@ void EventDispatcher::pauseTarget(Node* node) l->setPaused(true); } } + + if (recursive) + { + const auto& children = target->getChildren(); + for (const auto& child : children) + { + pauseEventListenersForTarget(child, true); + } + } } -void EventDispatcher::resumeTarget(Node* node) +void EventDispatcher::resumeEventListenersForTarget(Node* target, bool recursive/* = false */) { - auto listenerIter = _nodeListenersMap.find(node); + auto listenerIter = _nodeListenersMap.find(target); if (listenerIter != _nodeListenersMap.end()) { auto listeners = listenerIter->second; @@ -291,12 +300,21 @@ void EventDispatcher::resumeTarget(Node* node) l->setPaused(false); } } - setDirtyForNode(node); + setDirtyForNode(target); + + if (recursive) + { + const auto& children = target->getChildren(); + for (const auto& child : children) + { + resumeEventListenersForTarget(child, true); + } + } } -void EventDispatcher::cleanTarget(Node* node) +void EventDispatcher::removeEventListenersForTarget(Node* target, bool recursive/* = false */) { - auto listenerIter = _nodeListenersMap.find(node); + auto listenerIter = _nodeListenersMap.find(target); if (listenerIter != _nodeListenersMap.end()) { auto listeners = listenerIter->second; @@ -306,6 +324,15 @@ void EventDispatcher::cleanTarget(Node* node) removeEventListener(l); } } + + if (recursive) + { + const auto& children = target->getChildren(); + for (const auto& child : children) + { + removeEventListenersForTarget(child, true); + } + } } void EventDispatcher::associateNodeAndEventListener(Node* node, EventListener* listener) @@ -389,7 +416,7 @@ void EventDispatcher::forceAddEventListener(EventListener* listener) if (node->isRunning()) { - resumeTarget(node); + resumeEventListenersForTarget(node); } } else @@ -430,7 +457,7 @@ void EventDispatcher::addEventListenerWithFixedPriority(EventListener* listener, addEventListener(listener); } -EventListenerCustom* EventDispatcher::addCustomEventListener(const std::string &eventName, std::function callback) +EventListenerCustom* EventDispatcher::addCustomEventListener(const std::string &eventName, const std::function& callback) { EventListenerCustom *listener = EventListenerCustom::create(eventName, callback); addEventListenerWithFixedPriority(listener, 1); @@ -443,7 +470,7 @@ void EventDispatcher::removeEventListener(EventListener* listener) return; bool isFound = false; - + auto removeListenerInVector = [&](std::vector* listeners){ if (listeners == nullptr) return; @@ -553,7 +580,7 @@ void EventDispatcher::setPriority(EventListener* listener, int fixedPriority) } } -void EventDispatcher::dispatchEventToListeners(EventListenerVector* listeners, std::function onEvent) +void EventDispatcher::dispatchEventToListeners(EventListenerVector* listeners, const std::function& onEvent) { bool shouldStopPropagation = false; auto fixedPriorityListeners = listeners->getFixedPriorityListeners(); @@ -1121,7 +1148,7 @@ void EventDispatcher::removeEventListenersForListenerID(const EventListener::Lis } } -void EventDispatcher::removeEventListeners(EventListener::Type listenerType) +void EventDispatcher::removeEventListenersForType(EventListener::Type listenerType) { if (listenerType == EventListener::Type::TOUCH_ONE_BY_ONE) { diff --git a/cocos/2d/CCEventDispatcher.h b/cocos/2d/CCEventDispatcher.h index 9e9077159d..1178cb8444 100644 --- a/cocos/2d/CCEventDispatcher.h +++ b/cocos/2d/CCEventDispatcher.h @@ -56,6 +56,8 @@ dispatched. class EventDispatcher : public Ref { public: + // Adds event listener + /** Adds a event listener for a specified event with the priority of scene graph. * @param listener The listener of a specified event. * @param node The priority of the listener is based on the draw order of this node. @@ -76,22 +78,41 @@ public: It will use a fixed priority of 1. @return the generated event. Needed in order to remove the event from the dispather */ - EventListenerCustom* addCustomEventListener(const std::string &eventName, std::function callback); + EventListenerCustom* addCustomEventListener(const std::string &eventName, const std::function& callback); + ///////////////////////////////////////////// + + // Removes event listener + /** Remove a listener * @param listener The specified event listener which needs to be removed. */ void removeEventListener(EventListener* listener); /** Removes all listeners with the same event listener type */ - void removeEventListeners(EventListener::Type listenerType); + void removeEventListenersForType(EventListener::Type listenerType); + /** Removes all listeners which are associated with the specified target. */ + void removeEventListenersForTarget(Node* target, bool recursive = false); + /** Removes all custom listeners with the same event name */ void removeCustomEventListeners(const std::string& customEventName); /** Removes all listeners */ void removeAllEventListeners(); + ///////////////////////////////////////////// + + // Pauses / Resumes event listener + + /** Pauses all listeners which are associated the specified target. */ + void pauseEventListenersForTarget(Node* target, bool recursive = false); + + /** Resumes all listeners which are associated the specified target. */ + void resumeEventListenersForTarget(Node* target, bool recursive = false); + + ///////////////////////////////////////////// + /** Sets listener's priority with fixed value. */ void setPriority(EventListener* listener, int fixedPriority); @@ -101,6 +122,8 @@ public: /** Checks whether dispatching events is enabled */ bool isEnabled() const; + ///////////////////////////////////////////// + /** Dispatches the event * Also removes all EventListeners marked for deletion from the * event dispatcher list. @@ -110,6 +133,8 @@ public: /** Dispatches a Custom Event with a event name an optional user data */ void dispatchCustomEvent(const std::string &eventName, void *optionalUserData = nullptr); + ///////////////////////////////////////////// + /** Constructor of EventDispatcher */ EventDispatcher(); /** Destructor of EventDispatcher */ @@ -121,15 +146,6 @@ protected: /** Sets the dirty flag for a node. */ void setDirtyForNode(Node* node); - /** Notifys event dispatcher that the node has been paused. */ - void pauseTarget(Node* node); - - /** Notifys event dispatcher that the node has been resumed. */ - void resumeTarget(Node* node); - - /** Notifys event dispatcher that the node has been deleted. */ - void cleanTarget(Node* node); - /** * The vector to store event listeners with scene graph based priority and fixed priority. */ @@ -202,7 +218,7 @@ protected: void dissociateNodeAndEventListener(Node* node, EventListener* listener); /** Dispatches event to listeners with a specified listener type */ - void dispatchEventToListeners(EventListenerVector* listeners, std::function onEvent); + void dispatchEventToListeners(EventListenerVector* listeners, const std::function& onEvent); /// Priority dirty flag enum class DirtyFlag diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 49472cf822..9bf31270c1 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -156,7 +156,7 @@ Node::~Node() CC_SAFE_RELEASE(_actionManager); CC_SAFE_RELEASE(_scheduler); - _eventDispatcher->cleanTarget(this); + _eventDispatcher->removeEventListenersForTarget(this); CC_SAFE_RELEASE(_eventDispatcher); // attributes @@ -1050,7 +1050,7 @@ void Node::setEventDispatcher(EventDispatcher* dispatcher) { if (dispatcher != _eventDispatcher) { - _eventDispatcher->cleanTarget(this); + _eventDispatcher->removeEventListenersForTarget(this); CC_SAFE_RETAIN(dispatcher); CC_SAFE_RELEASE(_eventDispatcher); _eventDispatcher = dispatcher; @@ -1198,14 +1198,14 @@ void Node::resume() { _scheduler->resumeTarget(this); _actionManager->resumeTarget(this); - _eventDispatcher->resumeTarget(this); + _eventDispatcher->resumeEventListenersForTarget(this); } void Node::pause() { _scheduler->pauseTarget(this); _actionManager->pauseTarget(this); - _eventDispatcher->pauseTarget(this); + _eventDispatcher->pauseEventListenersForTarget(this); } void Node::resumeSchedulerAndActions() diff --git a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp index 2464d7b40f..7b4ff93a6c 100644 --- a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp +++ b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp @@ -24,6 +24,7 @@ std::function createFunctions[] = CL(DirectorEventTest), CL(GlobalZTouchTest), CL(StopPropagationTest), + CL(PauseResumeTargetTest), CL(Issue4129), CL(Issue4160) }; @@ -187,7 +188,7 @@ void TouchableSpriteTest::onEnter() auto senderItem = static_cast(sender); senderItem->setString("Only Next item could be clicked"); - _eventDispatcher->removeEventListeners(EventListener::Type::TOUCH_ONE_BY_ONE); + _eventDispatcher->removeEventListenersForType(EventListener::Type::TOUCH_ONE_BY_ONE); auto nextItem = MenuItemFont::create("Next", [=](Ref* sender){ nextCallback(nullptr); @@ -223,21 +224,32 @@ std::string TouchableSpriteTest::subtitle() const // FixedPriorityChangedTest -class TouchableSpriteWithFixedPriority : public Sprite +class TouchableSprite : public Sprite { public: + static TouchableSprite* create(int priority = 0) + { + auto ret = new TouchableSprite(priority); + if (ret && ret->init()) + { + ret->autorelease(); + } + else + { + CC_SAFE_DELETE(ret); + } + return ret; + } - CREATE_FUNC(TouchableSpriteWithFixedPriority); - - TouchableSpriteWithFixedPriority() +protected: + TouchableSprite(int priority) : _listener(nullptr) - , _fixedPriority(0) + , _fixedPriority(priority) , _removeListenerOnTouchEnded(false) { } - void setPriority(int fixedPriority) { _fixedPriority = fixedPriority; }; - +public: void onEnter() override { Sprite::onEnter(); @@ -268,7 +280,14 @@ public: } }; - _eventDispatcher->addEventListenerWithFixedPriority(listener, _fixedPriority); + if (_fixedPriority != 0) + { + _eventDispatcher->addEventListenerWithFixedPriority(listener, _fixedPriority); + } + else + { + _eventDispatcher->addEventListenerWithSceneGraphPriority(listener, this); + } _listener = listener; } @@ -295,21 +314,18 @@ void FixedPriorityTest::onEnter() Point origin = Director::getInstance()->getVisibleOrigin(); Size size = Director::getInstance()->getVisibleSize(); - auto sprite1 = TouchableSpriteWithFixedPriority::create(); + auto sprite1 = TouchableSprite::create(30); sprite1->setTexture("Images/CyanSquare.png"); - sprite1->setPriority(30); sprite1->setPosition(origin+Point(size.width/2, size.height/2) + Point(-80, 40)); addChild(sprite1, 10); - auto sprite2 = TouchableSpriteWithFixedPriority::create(); + auto sprite2 = TouchableSprite::create(20); sprite2->setTexture("Images/MagentaSquare.png"); - sprite2->setPriority(20); sprite2->setPosition(origin+Point(size.width/2, size.height/2)); addChild(sprite2, 20); - auto sprite3 = TouchableSpriteWithFixedPriority::create(); + auto sprite3 = TouchableSprite::create(10); sprite3->setTexture("Images/YellowSquare.png"); - sprite3->setPriority(10); sprite3->setPosition(Point(0, 0)); sprite2->addChild(sprite3, 1); @@ -701,7 +717,7 @@ void RemoveListenerAfterAddingTest::onEnter() }; _eventDispatcher->addEventListenerWithFixedPriority(listener, -1); - _eventDispatcher->removeEventListeners(EventListener::Type::TOUCH_ONE_BY_ONE); + _eventDispatcher->removeEventListenersForType(EventListener::Type::TOUCH_ONE_BY_ONE); addNextButton(); }); @@ -1087,6 +1103,72 @@ std::string StopPropagationTest::subtitle() const return "Shouldn't crash and only blue block could be clicked"; } +// PauseResumeTargetTest +PauseResumeTargetTest::PauseResumeTargetTest() +{ + Point origin = Director::getInstance()->getVisibleOrigin(); + Size size = Director::getInstance()->getVisibleSize(); + + auto sprite1 = TouchableSprite::create(); + sprite1->setTexture("Images/CyanSquare.png"); + sprite1->setPosition(origin+Point(size.width/2, size.height/2) + Point(-80, 40)); + addChild(sprite1, -10); + + auto sprite2 = TouchableSprite::create(); + sprite2->setTexture("Images/MagentaSquare.png"); + sprite2->setPosition(origin+Point(size.width/2, size.height/2)); + addChild(sprite2, -20); + + auto sprite3 = TouchableSprite::create(); + sprite3->setTexture("Images/YellowSquare.png"); + sprite3->setPosition(Point(0, 0)); + sprite2->addChild(sprite3, -1); + + auto popup = MenuItemFont::create("Popup", [this](Ref* sender){ + + _eventDispatcher->pauseEventListenersForTarget(this, true); + + auto colorLayer = LayerColor::create(Color4B(0, 0, 255, 100)); + this->addChild(colorLayer, 99999); + + auto closeItem = MenuItemFont::create("close", [this, colorLayer](Ref* sender){ + colorLayer->removeFromParent(); + _eventDispatcher->resumeEventListenersForTarget(this, true); + }); + + closeItem->setPosition(VisibleRect::center()); + + auto closeMenu = Menu::create(closeItem, NULL); + closeMenu->setAnchorPoint(Point::ANCHOR_BOTTOM_LEFT); + closeMenu->setPosition(Point::ZERO); + + colorLayer->addChild(closeMenu); + }); + + popup->setAnchorPoint(Point::ANCHOR_MIDDLE_RIGHT); + popup->setPosition(VisibleRect::right()); + + auto menu = Menu::create(popup, nullptr); + menu->setAnchorPoint(Point::ANCHOR_BOTTOM_LEFT); + menu->setPosition(Point::ZERO); + + addChild(menu); +} + +PauseResumeTargetTest::~PauseResumeTargetTest() +{ +} + +std::string PauseResumeTargetTest::title() const +{ + return "PauseResumeTargetTest"; +} + +std::string PauseResumeTargetTest::subtitle() const +{ + return ""; +} + // Issue4129 Issue4129::Issue4129() : _bugFixed(false) @@ -1157,22 +1239,19 @@ Issue4160::Issue4160() Point origin = Director::getInstance()->getVisibleOrigin(); Size size = Director::getInstance()->getVisibleSize(); - auto sprite1 = TouchableSpriteWithFixedPriority::create(); + auto sprite1 = TouchableSprite::create(-30); sprite1->setTexture("Images/CyanSquare.png"); - sprite1->setPriority(-30); sprite1->setPosition(origin+Point(size.width/2, size.height/2) + Point(-80, 40)); addChild(sprite1, -10); - auto sprite2 = TouchableSpriteWithFixedPriority::create(); + auto sprite2 = TouchableSprite::create(-20); sprite2->setTexture("Images/MagentaSquare.png"); - sprite2->setPriority(-20); sprite2->removeListenerOnTouchEnded(true); sprite2->setPosition(origin+Point(size.width/2, size.height/2)); addChild(sprite2, -20); - auto sprite3 = TouchableSpriteWithFixedPriority::create(); + auto sprite3 = TouchableSprite::create(-10); sprite3->setTexture("Images/YellowSquare.png"); - sprite3->setPriority(-10); sprite3->setPosition(Point(0, 0)); sprite2->addChild(sprite3, -1); } diff --git a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h index 4392998358..e35035b4c6 100644 --- a/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h +++ b/tests/Classes/NewEventDispatcherTest/NewEventDispatcherTest.h @@ -165,6 +165,19 @@ protected: bool isPointInTopHalfAreaOfScreen(Point pt); }; +class PauseResumeTargetTest : public EventDispatcherTestDemo +{ +public: + CREATE_FUNC(PauseResumeTargetTest); + PauseResumeTargetTest(); + virtual ~PauseResumeTargetTest(); + + virtual std::string title() const override; + virtual std::string subtitle() const override; + +private: +}; + class Issue4129 : public EventDispatcherTestDemo { public: From dceb047ba61e73dc7522987fda89f9acdf181224 Mon Sep 17 00:00:00 2001 From: James Chen Date: Sun, 2 Mar 2014 18:43:17 +0800 Subject: [PATCH 50/69] TimerTargetCallback::initWithLambda -> TimerTargetCallback::initWithCallback. --- cocos/2d/CCScheduler.cpp | 4 ++-- cocos/2d/CCScheduler.h | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/2d/CCScheduler.cpp b/cocos/2d/CCScheduler.cpp index 9ddb825e18..aa0e5e69d3 100644 --- a/cocos/2d/CCScheduler.cpp +++ b/cocos/2d/CCScheduler.cpp @@ -183,7 +183,7 @@ TimerTargetCallback::TimerTargetCallback() { } -bool TimerTargetCallback::initWithLambda(const ccSchedulerFunc& callback, void *target, const std::string& key, float seconds, unsigned int repeat, float delay) +bool TimerTargetCallback::initWithCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float seconds, unsigned int repeat, float delay) { _target = target; _callback = callback; @@ -326,7 +326,7 @@ void Scheduler::scheduleCallback(const ccSchedulerFunc& callback, void *target, } TimerTargetCallback *timer = new TimerTargetCallback(); - timer->initWithLambda(callback, target, key, interval, repeat, delay); + timer->initWithCallback(callback, target, key, interval, repeat, delay); ccArrayAppendObject(element->timers, timer); timer->release(); } diff --git a/cocos/2d/CCScheduler.h b/cocos/2d/CCScheduler.h index 2a3d8fabdb..dc5e77e49b 100644 --- a/cocos/2d/CCScheduler.h +++ b/cocos/2d/CCScheduler.h @@ -104,7 +104,7 @@ public: TimerTargetCallback(); /** Initializes a timer with a target, a lambda and an interval in seconds, repeat in number of times to repeat, delay in seconds. */ - bool initWithLambda(const ccSchedulerFunc& callback, void *target, const std::string& key, float seconds, unsigned int repeat, float delay); + bool initWithCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float seconds, unsigned int repeat, float delay); /** * @js NA From a6e4a5e5aa504db70076d394320c2ee87b6eb976 Mon Sep 17 00:00:00 2001 From: cai wenzhi Date: Sun, 2 Mar 2014 22:41:47 +0800 Subject: [PATCH 51/69] Adjust layout --- cocos/gui/UILayout.cpp | 78 ------------------------------------------ 1 file changed, 78 deletions(-) diff --git a/cocos/gui/UILayout.cpp b/cocos/gui/UILayout.cpp index 1b2c071197..af0d2c8464 100644 --- a/cocos/gui/UILayout.cpp +++ b/cocos/gui/UILayout.cpp @@ -1257,128 +1257,50 @@ void Layout::doLayout() case RELATIVE_LOCATION_ABOVE_LEFTALIGN: finalPosY += mg.bottom; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT) - { - finalPosY += relativeWidgetMargin.top; - } finalPosX += mg.left; break; case RELATIVE_LOCATION_ABOVE_RIGHTALIGN: finalPosY += mg.bottom; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT) - { - finalPosY += relativeWidgetMargin.top; - } finalPosX -= mg.right; break; case RELATIVE_LOCATION_ABOVE_CENTER: finalPosY += mg.bottom; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_CENTER_HORIZONTAL - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT) - { - finalPosY += relativeWidgetMargin.top; - } break; case RELATIVE_LOCATION_LEFT_OF_TOPALIGN: finalPosX -= mg.right; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL) - { - finalPosX -= relativeWidgetMargin.left; - } finalPosY -= mg.top; break; case RELATIVE_LOCATION_LEFT_OF_BOTTOMALIGN: finalPosX -= mg.right; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL) - { - finalPosX -= relativeWidgetMargin.left; - } finalPosY += mg.bottom; break; case RELATIVE_LOCATION_LEFT_OF_CENTER: finalPosX -= mg.right; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_LEFT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_NONE - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_CENTER_VERTICAL) - { - finalPosX -= relativeWidgetMargin.left; - } break; case RELATIVE_LOCATION_RIGHT_OF_TOPALIGN: finalPosX += mg.left; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL) - { - finalPosX += relativeWidgetMargin.right; - } finalPosY -= mg.top; break; case RELATIVE_LOCATION_RIGHT_OF_BOTTOMALIGN: finalPosX += mg.left; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL) - { - finalPosX += relativeWidgetMargin.right; - } finalPosY += mg.bottom; break; case RELATIVE_LOCATION_RIGHT_OF_CENTER: finalPosX += mg.left; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_TOP_RIGHT - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_CENTER_VERTICAL) - { - finalPosX += relativeWidgetMargin.right; - } break; case RELATIVE_LOCATION_BELOW_LEFTALIGN: finalPosY -= mg.top; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL) - { - finalPosY -= relativeWidgetMargin.bottom; - } finalPosX += mg.left; break; case RELATIVE_LOCATION_BELOW_RIGHTALIGN: finalPosY -= mg.top; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL) - { - finalPosY -= relativeWidgetMargin.bottom; - } finalPosX -= mg.right; break; case RELATIVE_LOCATION_BELOW_CENTER: finalPosY -= mg.top; - if (relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_LEFT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_RIGHT_BOTTOM - && relativeWidgetLP->getAlign() != RELATIVE_ALIGN_PARENT_BOTTOM_CENTER_HORIZONTAL) - { - finalPosY -= relativeWidgetMargin.bottom; - } break; default: break; From c99b0a0b6a879e9fd5ff0ad9d5dc2c6bfd68fd05 Mon Sep 17 00:00:00 2001 From: boyu0 Date: Mon, 3 Mar 2014 01:48:56 +0800 Subject: [PATCH 52/69] closed #4150: Fix missing "!" --- cocos/2d/CCNode.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 69a3454cac..ef64a15da9 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -537,7 +537,7 @@ const Point& Node::getAnchorPoint() const void Node::setAnchorPoint(const Point& point) { #if CC_USE_PHYSICS - if (_physicsBody != nullptr && point.equals(Point::ANCHOR_MIDDLE)) + if (_physicsBody != nullptr && !point.equals(Point::ANCHOR_MIDDLE)) { CCLOG("Node warning: This node has a physics body, the anchor must be in the middle, you cann't change this to other value."); return; From 8189d153b6dcdac494d12492647388cb51a92c0d Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 3 Mar 2014 10:01:41 +0800 Subject: [PATCH 53/69] add install.py --- install.py | 188 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 188 insertions(+) create mode 100755 install.py diff --git a/install.py b/install.py new file mode 100755 index 0000000000..d2e422196c --- /dev/null +++ b/install.py @@ -0,0 +1,188 @@ +#!/usr/bin/python +#coding=utf-8 +"""**************************************************************************** +Copyright (c) 2014 cocos2d-x.org + +http://www.cocos2d-x.org + +Permission is hereby granted, free of charge, to any person obtaining a copy +of this software and associated documentation files (the "Software"), to deal +in the Software without restriction, including without limitation the rights +to use, copy, modify, merge, publish, distribute, sublicense, and/or sell +copies of the Software, and to permit persons to whom the Software is +furnished to do so, subject to the following conditions: + +The above copyright notice and this permission notice shall be included in +all copies or substantial portions of the Software. + +THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR +IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, +FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE +AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER +LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, +OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN +THE SOFTWARE. +****************************************************************************""" + +import os +import sys +from optparse import OptionParser + +COCOS_CONSOLE_ROOT = 'COCOS_CONSOLE_ROOT' +NDK_ROOT = 'NDK_ROOT1' + + +class SetEnvVar: + + current_absolute_path = os.path.dirname(os.path.realpath(__file__)) + + @staticmethod + def _isWindows(): + return sys.platform == 'win32' + + @staticmethod + def _isLinux(): + return sys.platform.startswith('linux') + + # modify register table to add an environment variable on windows + # TODO: test in on windows + @staticmethod + def _set_environment_variable_win32(key, value): + + import _winreg + + env = _winreg.OpenKeyEx(_winreg._winreg.HKEY_LOCAL_MACHINE,\ + r'SYSTEM\ControlSet001\Control\Session Manager\Environment',\ + 0, + _winreg.KEY_SET_VALUE|_winreg.KEY_READ) + _winreg.SetValueEx(env, key, 0, _winreg.REG_SZ, value) + + # modify ~/.bash_profile to add an environment variable + @staticmethod + def _set_environment_variable_unix(key, value): + home = os.path.expanduser('~') + profile_path = os.path.join(home, '.bash_profile') + + file = open(profile_path, 'a') + file.write('export %s=%s\n' % (key, value)) + file.write('export PATH=$%s:$PATH\n' % key) + file.close() + + # make it take effect immediately + cmd = 'source ' + profile_path + p = os.popen(cmd) + p.close() + + + @staticmethod + def _set_environment_variable(key, value): + + if SetEnvVar._isWindows(): + _set_environment_variable_win32(key, value) + else: + SetEnvVar._set_environment_variable_unix(key, value) + + @staticmethod + def set_environment_variables(): + + SetEnvVar.set_console_root() + SetEnvVar.set_ndk_root(None) + + @staticmethod + def set_console_root(): + + try: + cocos_console_root = os.environ[COCOS_CONSOLE_ROOT] + except Exception: + cocos_console_root = os.path.join(os.path.dirname(os.path.realpath(__file__)), 'tools/cocos2d-console/bin') + SetEnvVar._set_environment_variable(COCOS_CONSOLE_ROOT, cocos_console_root) + os.environ[COCOS_CONSOLE_ROOT] = cocos_console_root + finally: + print "'COCOS_CONSOLE_ROOT' is %s" % cocos_console_root + + @staticmethod + def _get_ndk_root(): + + ndk_root = None + + # python on linux doesn't include Tkinter model, so let user input in terminal + if SetEnvVar._isLinux(): + print "not linux" + while True: + + ndk_root = raw_input('Enter path of ndk, press enter to skip: ') + if not ndk_root: + break + + if not os.path.exists(ndk_root): + print 'input path %s does not exist' % ndk_root + else: + break + + else: + # pop up a window to let user select path for ndk root + import Tkinter, tkFileDialog + + try: + ndk_root = os.environ[NDK_ROOT] + except Exception: + root = Tkinter.Tk() + SetEnvVar._center(root) + + def callback(): + ndk_root = tkFileDialog.askdirectory() + root.destroy() + + + frame = Tkinter.Frame(root) + Tkinter.Label(frame, text='select path for ndk root').pack(side=Tkinter.LEFT) + Tkinter.Button(frame, text='...', command=callback).pack(side=Tkinter.LEFT) + frame.pack() + root.mainloop() + + return ndk_root + + # display a window in center and put it on top + @staticmethod + def _center(win): + win.update_idletasks() + width = win.winfo_width() + height = win.winfo_height() + x = (win.winfo_screenwidth() / 2) - (width / 2) + y = (win.winfo_screenheight() / 2) - (height / 2) + win.geometry('{}x{}+{}+{}'.format(width, height, x, y)) + win.wm_attributes('-topmost', 1) + + + @staticmethod + def set_ndk_root(value): + + if value: + ndk_root = value + else: + ndk_root = SetEnvVar._get_ndk_root() + + print "ndk_root is %s" % ndk_root + + if ndk_root: + os.environ[NDK_ROOT] = ndk_root + SetEnvVar._set_environment_variable(NDK_ROOT, ndk_root) + +usage = "" + + +if __name__ == '__main__': + + parser = OptionParser() + parser.add_option('-n', '--ndkroot', dest='ndk_root', help='directory of ndk root') + opts, args = parser.parse_args() + + # ndk_root is passed in + if opts.ndk_root: + os.environ[NDK_ROOT] = opts.ndk_root + SetEnvVar.set_ndk_root() + exit(0) + + # set environment variables + SetEnvVar.set_environment_variables() + \ No newline at end of file From e0178ae886b8f88be52a1d0ac7f2757a328189d5 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 3 Mar 2014 10:08:47 +0800 Subject: [PATCH 54/69] Update CHANGELOG [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index ebbd7781f7..63ff949ec2 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -3,6 +3,7 @@ cocos2d-x-3.0rc0 Feb.?? 2014 [NEW] Action: RotateBy supports 3D rotations [NEW] Bindings: Using python to automatically generate script bindings [NEW] Bindings: Added JS bindings support for Linux + [NEW] Console: Added command: 'autotest run|main|next|back|restart'. [NEW] Console: Added 'resolution', 'projection' commands. Improved API [NEW] Console: Added more commands: director resume|pause|stopanimation|startanimation. [NEW] Console: Added command: 'touch tap|swipe' to simulating touch events. From 757425c54b7ac069dd2ffe456070a674fb8086ff Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 3 Mar 2014 11:00:30 +0800 Subject: [PATCH 55/69] issue #4165: Scheduler::scheduleCallback -> Scheduler::schedule, Scheduler::scheduleSelector -> Scheduler::schedule. APIs are clear for c++ developers now. --- cocos/2d/CCDirector.cpp | 2 +- cocos/2d/CCNode.cpp | 12 +- cocos/2d/CCScheduler.cpp | 36 ++--- cocos/2d/CCScheduler.h | 126 +++++++++--------- cocos/2d/CCTextureCache.cpp | 4 +- .../cocostudio/CCActionObject.cpp | 6 +- .../cocostudio/CCDataReaderHelper.cpp | 4 +- cocos/network/SocketIO.cpp | 2 +- cocos/network/WebSocket.cpp | 2 +- .../CocoStudioSceneTest/TriggerCode/cons.cpp | 4 +- .../PerformanceTest/PerformanceAllocTest.cpp | 4 +- .../PerformanceContainerTest.cpp | 4 +- .../PerformanceEventDispatcherTest.cpp | 4 +- .../PerformanceTest/PerformanceLabelTest.cpp | 8 +- .../PerformanceNodeChildrenTest.cpp | 4 +- .../PerformanceTest/PerformanceSpriteTest.cpp | 8 +- tests/Classes/SchedulerTest/SchedulerTest.cpp | 30 ++--- 17 files changed, 128 insertions(+), 132 deletions(-) diff --git a/cocos/2d/CCDirector.cpp b/cocos/2d/CCDirector.cpp index fb3ddd8d08..3a8d7a9c2f 100644 --- a/cocos/2d/CCDirector.cpp +++ b/cocos/2d/CCDirector.cpp @@ -140,7 +140,7 @@ bool Director::init(void) _scheduler = new Scheduler(); // action manager _actionManager = new ActionManager(); - _scheduler->scheduleUpdateForTarget(_actionManager, Scheduler::PRIORITY_SYSTEM, false); + _scheduler->scheduleUpdate(_actionManager, Scheduler::PRIORITY_SYSTEM, false); _eventDispatcher = new EventDispatcher(); _eventAfterDraw = new EventCustom(EVENT_AFTER_DRAW); diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 581b341e7b..ba50bb10a1 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -1115,7 +1115,7 @@ void Node::setScheduler(Scheduler* scheduler) bool Node::isScheduled(SEL_SCHEDULE selector) { - return _scheduler->isScheduledForTarget(this, selector); + return _scheduler->isScheduled(selector, this); } void Node::scheduleUpdate() @@ -1125,7 +1125,7 @@ void Node::scheduleUpdate() void Node::scheduleUpdateWithPriority(int priority) { - _scheduler->scheduleUpdateForTarget(this, priority, !_running); + _scheduler->scheduleUpdate(this, priority, !_running); } void Node::scheduleUpdateWithPriorityLua(int nHandler, int priority) @@ -1136,12 +1136,12 @@ void Node::scheduleUpdateWithPriorityLua(int nHandler, int priority) _updateScriptHandler = nHandler; #endif - _scheduler->scheduleUpdateForTarget(this, priority, !_running); + _scheduler->scheduleUpdate(this, priority, !_running); } void Node::unscheduleUpdate() { - _scheduler->unscheduleUpdateForTarget(this); + _scheduler->unscheduleUpdate(this); #if CC_ENABLE_SCRIPT_BINDING if (_updateScriptHandler) @@ -1167,7 +1167,7 @@ void Node::schedule(SEL_SCHEDULE selector, float interval, unsigned int repeat, CCASSERT( selector, "Argument must be non-nil"); CCASSERT( interval >=0, "Argument must be positive"); - _scheduler->scheduleSelector(selector, this, interval , repeat, delay, !_running); + _scheduler->schedule(selector, this, interval , repeat, delay, !_running); } void Node::scheduleOnce(SEL_SCHEDULE selector, float delay) @@ -1181,7 +1181,7 @@ void Node::unschedule(SEL_SCHEDULE selector) if (selector == nullptr) return; - _scheduler->unscheduleSelector(selector, this); + _scheduler->unschedule(selector, this); } void Node::unscheduleAllSelectors() diff --git a/cocos/2d/CCScheduler.cpp b/cocos/2d/CCScheduler.cpp index aa0e5e69d3..530bb99232 100644 --- a/cocos/2d/CCScheduler.cpp +++ b/cocos/2d/CCScheduler.cpp @@ -172,7 +172,7 @@ void TimerTargetSelector::trigger() void TimerTargetSelector::cancel() { - Director::getInstance()->getScheduler()->unscheduleSelector(_selector, _target); + Director::getInstance()->getScheduler()->unschedule(_selector, _target); } // TimerTargetCallback @@ -202,7 +202,7 @@ void TimerTargetCallback::trigger() void TimerTargetCallback::cancel() { - Director::getInstance()->getScheduler()->unscheduleCallbackForKey(_key, _target); + Director::getInstance()->getScheduler()->unschedule(_key, _target); } #if CC_ENABLE_SCRIPT_BINDING @@ -277,12 +277,12 @@ void Scheduler::removeHashElement(_hashSelectorEntry *element) free(element); } -void Scheduler::scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, bool paused) +void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, float interval, bool paused, const std::string& key) { - this->scheduleCallback(callback, target, key, interval, kRepeatForever, 0.0f, paused); + this->schedule(callback, target, interval, kRepeatForever, 0.0f, paused, key); } -void Scheduler::scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, unsigned int repeat, float delay, bool paused) +void Scheduler::schedule(const ccSchedulerFunc& callback, void *target, float interval, unsigned int repeat, float delay, bool paused, const std::string& key) { CCASSERT(target, "Argument target must be non-nullptr"); CCASSERT(!key.empty(), "key should not be empty!"); @@ -331,7 +331,7 @@ void Scheduler::scheduleCallback(const ccSchedulerFunc& callback, void *target, timer->release(); } -void Scheduler::unscheduleCallbackForKey(const std::string &key, void *target) +void Scheduler::unschedule(const std::string &key, void *target) { // explicity handle nil arguments when removing an object if (target == nullptr || key.empty()) @@ -461,7 +461,7 @@ void Scheduler::appendIn(_listEntry **list, const ccSchedulerFunc& callback, voi HASH_ADD_PTR(_hashForUpdates, target, hashElement); } -void Scheduler::scheduleCallbackPerFrame(const ccSchedulerFunc& callback, void *target, int priority, bool paused) +void Scheduler::schedulePerFrame(const ccSchedulerFunc& callback, void *target, int priority, bool paused) { tHashUpdateEntry *hashElement = nullptr; HASH_FIND_PTR(_hashForUpdates, &target, hashElement); @@ -493,7 +493,7 @@ void Scheduler::scheduleCallbackPerFrame(const ccSchedulerFunc& callback, void * } } -bool Scheduler::isScheduledForKey(const std::string& key, void *target) +bool Scheduler::isScheduled(const std::string& key, void *target) { CCASSERT(!key.empty(), "Argument key must not be empty"); CCASSERT(target, "Argument target must be non-nullptr"); @@ -545,7 +545,7 @@ void Scheduler::removeUpdateFromHash(struct _listEntry *entry) } } -void Scheduler::unscheduleUpdateForTarget(void *target) +void Scheduler::unscheduleUpdate(void *target) { if (target == nullptr) { @@ -594,7 +594,7 @@ void Scheduler::unscheduleAllWithMinPriority(int minPriority) { if(entry->priority >= minPriority) { - unscheduleUpdateForTarget(entry->target); + unscheduleUpdate(entry->target); } } } @@ -603,7 +603,7 @@ void Scheduler::unscheduleAllWithMinPriority(int minPriority) { DL_FOREACH_SAFE(_updates0List, entry, tmp) { - unscheduleUpdateForTarget(entry->target); + unscheduleUpdate(entry->target); } } @@ -611,7 +611,7 @@ void Scheduler::unscheduleAllWithMinPriority(int minPriority) { if(entry->priority >= minPriority) { - unscheduleUpdateForTarget(entry->target); + unscheduleUpdate(entry->target); } } #if CC_ENABLE_SCRIPT_BINDING @@ -652,7 +652,7 @@ void Scheduler::unscheduleAllForTarget(void *target) } // update selector - unscheduleUpdateForTarget(target); + unscheduleUpdate(target); } #if CC_ENABLE_SCRIPT_BINDING @@ -968,7 +968,7 @@ void Scheduler::update(float dt) } } -void Scheduler::scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) +void Scheduler::schedule(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) { CCASSERT(target, "Argument target must be non-nullptr"); @@ -1016,12 +1016,12 @@ void Scheduler::scheduleSelector(SEL_SCHEDULE selector, Ref *target, float inter timer->release(); } -void Scheduler::scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, bool paused) +void Scheduler::schedule(SEL_SCHEDULE selector, Ref *target, float interval, bool paused) { - this->scheduleSelector(selector, target, interval, kRepeatForever, 0.0f, paused); + this->schedule(selector, target, interval, kRepeatForever, 0.0f, paused); } -bool Scheduler::isScheduledForSelector(SEL_SCHEDULE selector, Ref *target) +bool Scheduler::isScheduled(SEL_SCHEDULE selector, Ref *target) { CCASSERT(selector, "Argument selector must be non-nullptr"); CCASSERT(target, "Argument target must be non-nullptr"); @@ -1056,7 +1056,7 @@ bool Scheduler::isScheduledForSelector(SEL_SCHEDULE selector, Ref *target) return false; // should never get here } -void Scheduler::unscheduleSelector(SEL_SCHEDULE selector, Ref *target) +void Scheduler::unschedule(SEL_SCHEDULE selector, Ref *target) { // explicity handle nil arguments when removing an object if (target == nullptr || selector == nullptr) diff --git a/cocos/2d/CCScheduler.h b/cocos/2d/CCScheduler.h index dc5e77e49b..9059611b7f 100644 --- a/cocos/2d/CCScheduler.h +++ b/cocos/2d/CCScheduler.h @@ -151,7 +151,7 @@ class SchedulerScriptHandlerEntry; #endif /** @brief Scheduler is responsible for triggering the scheduled callbacks. -You should not use NSTimer. Instead use this class. +You should not use system timer for your game logic. Instead, use this class. There are 2 different types of callbacks (selectors): @@ -196,7 +196,9 @@ public: */ void update(float dt); - // schedule / unschedule 'callback'. Added from v3.0-final + ///////////////////////////////////// + + // schedule /** The scheduled method will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. @@ -207,27 +209,13 @@ public: @param key The key to identify the callback @since v3.0 */ - void scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, unsigned int repeat, float delay, bool paused); + void schedule(const ccSchedulerFunc& callback, void *target, float interval, unsigned int repeat, float delay, bool paused, const std::string& key); /** Calls scheduleCallback with kRepeatForever and a 0 delay @since v3.0 */ - void scheduleCallback(const ccSchedulerFunc& callback, void *target, const std::string& key, float interval, bool paused); + void schedule(const ccSchedulerFunc& callback, void *target, float interval, bool paused, const std::string& key); - /** Checks whether a callback associated with 'key' and 'target' is scheduled. - @since v3.0.0 - */ - bool isScheduledForKey(const std::string& key, void *target); - - /** Unschedules a callback for a key and a given target. - If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate. - @since v3.0 - */ - void unscheduleCallbackForKey(const std::string& key, void *target); - - ///////////////////////////////////// - - // schedule / unschedule 'selector' /** The scheduled method will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. @@ -236,55 +224,56 @@ public: repeat let the action be repeated repeat + 1 times, use kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start - @since v0.99.3, repeat and delay added in v1.1 + @since v3.0, repeat and delay added in v1.1 */ - void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused); + void schedule(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused); /** calls scheduleSelector with kRepeatForever and a 0 delay */ - void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, bool paused); - - /** Unschedule a selector for a given target. - If you want to unschedule the "update", use unscheudleUpdateForTarget. - @since v0.99.3 - */ - void unscheduleSelector(SEL_SCHEDULE selector, Ref *target); - - /** Checks whether a selector for a given taget is scheduled. - @since v0.99.3 - */ - CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduledForSelector(selector, target); }; - - /** Checks whether a selector for a given taget is scheduled. - @since v3.0 - */ - bool isScheduledForSelector(SEL_SCHEDULE selector, Ref *target); - - ///////////////////////////////////// - - // schedule / unschedule 'update' + void schedule(SEL_SCHEDULE selector, Ref *target, float interval, bool paused); /** Schedules the 'update' selector for a given target with a given priority. The 'update' selector will be called every frame. The lower the priority, the earlier it is called. - @since v0.99.3 + @since v3.0 @lua NA */ template - void scheduleUpdateForTarget(T *target, int priority, bool paused) + void scheduleUpdate(T *target, int priority, bool paused) { - this->scheduleCallbackPerFrame([target](float dt){ + this->schedulePerFrame([target](float dt){ target->update(dt); }, target, priority, paused); } + +#if CC_ENABLE_SCRIPT_BINDING + // schedule for script bindings + /** The scheduled script callback will be called every 'interval' seconds. + If paused is true, then it won't be called until it is resumed. + If 'interval' is 0, it will be called every frame. + return schedule script entry ID, used for unscheduleScriptFunc(). + */ + unsigned int scheduleScriptFunc(unsigned int handler, float interval, bool paused); +#endif + ///////////////////////////////////// + + // unschedule + + /** Unschedules a callback for a key and a given target. + If you want to unschedule the 'callbackPerFrame', use unscheduleUpdate. + @since v3.0 + */ + void unschedule(const std::string& key, void *target); + + /** Unschedule a selector for a given target. + If you want to unschedule the "update", use unscheudleUpdateForTarget. + @since v3.0 + */ + void unschedule(SEL_SCHEDULE selector, Ref *target); /** Unschedules the update selector for a given target @since v0.99.3 */ - void unscheduleUpdateForTarget(void *target); - - ///////////////////////////////////// - - // unschedule all + void unscheduleUpdate(void *target); /** Unschedules all selectors for a given target. This also includes the "update" selector. @@ -301,28 +290,32 @@ public: void unscheduleAll(void); /** Unschedules all selectors from all targets with a minimum priority. - You should only call this with kPriorityNonSystemMin or higher. - @since v2.0.0 - */ - void unscheduleAllWithMinPriority(int minPriority); - - ///////////////////////////////////// - - // schedule / unschedule for script bindings -#if CC_ENABLE_SCRIPT_BINDING - /** The scheduled script callback will be called every 'interval' seconds. - If paused is true, then it won't be called until it is resumed. - If 'interval' is 0, it will be called every frame. - return schedule script entry ID, used for unscheduleScriptFunc(). + You should only call this with kPriorityNonSystemMin or higher. + @since v2.0.0 */ - unsigned int scheduleScriptFunc(unsigned int handler, float interval, bool paused); + void unscheduleAllWithMinPriority(int minPriority); +#if CC_ENABLE_SCRIPT_BINDING /** Unschedule a script entry. */ void unscheduleScriptEntry(unsigned int scheduleScriptEntryID); #endif ///////////////////////////////////// + // isScheduled + + /** Checks whether a callback associated with 'key' and 'target' is scheduled. + @since v3.0.0 + */ + bool isScheduled(const std::string& key, void *target); + + /** Checks whether a selector for a given taget is scheduled. + @since v3.0 + */ + bool isScheduled(SEL_SCHEDULE selector, Ref *target); + + ///////////////////////////////////// + /** Pauses the target. All scheduled selectors/update for a given target won't be 'ticked' until the target is resumed. If the target is not present, nothing happens. @@ -367,7 +360,10 @@ public: @since v3.0 */ void performFunctionInCocosThread( const std::function &function); - + + // Deprecated methods: + + protected: /** Schedules the 'callback' function for a given target with a given priority. @@ -376,7 +372,7 @@ protected: @note This method is only for internal use. @since v3.0 */ - void scheduleCallbackPerFrame(const ccSchedulerFunc& callback, void *target, int priority, bool paused); + void schedulePerFrame(const ccSchedulerFunc& callback, void *target, int priority, bool paused); void removeHashElement(struct _hashSelectorEntry *element); void removeUpdateFromHash(struct _listEntry *entry); diff --git a/cocos/2d/CCTextureCache.cpp b/cocos/2d/CCTextureCache.cpp index aaa9ccfb4a..0ae5763a07 100644 --- a/cocos/2d/CCTextureCache.cpp +++ b/cocos/2d/CCTextureCache.cpp @@ -123,7 +123,7 @@ void TextureCache::addImageAsync(const std::string &path, std::functiongetScheduler()->scheduleSelector(schedule_selector(TextureCache::addImageAsyncCallBack), this, 0, false); + Director::getInstance()->getScheduler()->schedule(schedule_selector(TextureCache::addImageAsyncCallBack), this, 0, false); } ++_asyncRefCount; @@ -277,7 +277,7 @@ void TextureCache::addImageAsyncCallBack(float dt) --_asyncRefCount; if (0 == _asyncRefCount) { - Director::getInstance()->getScheduler()->unscheduleSelector(schedule_selector(TextureCache::addImageAsyncCallBack), this); + Director::getInstance()->getScheduler()->unschedule(schedule_selector(TextureCache::addImageAsyncCallBack), this); } } } diff --git a/cocos/editor-support/cocostudio/CCActionObject.cpp b/cocos/editor-support/cocostudio/CCActionObject.cpp index 62b2b8040f..aaeac50af9 100644 --- a/cocos/editor-support/cocostudio/CCActionObject.cpp +++ b/cocos/editor-support/cocostudio/CCActionObject.cpp @@ -154,11 +154,11 @@ void ActionObject::play() } if (_loop) { - _pScheduler->scheduleSelector(schedule_selector(ActionObject::simulationActionUpdate), this, 0.0f , kRepeatForever, 0.0f, false); + _pScheduler->schedule(schedule_selector(ActionObject::simulationActionUpdate), this, 0.0f , kRepeatForever, 0.0f, false); } else { - _pScheduler->scheduleSelector(schedule_selector(ActionObject::simulationActionUpdate), this, 0.0f, false); + _pScheduler->schedule(schedule_selector(ActionObject::simulationActionUpdate), this, 0.0f, false); } } @@ -178,7 +178,7 @@ void ActionObject::stop() { e->stopAction(); } - _pScheduler->unscheduleSelector(schedule_selector(ActionObject::simulationActionUpdate), this); + _pScheduler->unschedule(schedule_selector(ActionObject::simulationActionUpdate), this); _bPause = false; } diff --git a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp index 895784be29..32e2439644 100644 --- a/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp +++ b/cocos/editor-support/cocostudio/CCDataReaderHelper.cpp @@ -363,7 +363,7 @@ void DataReaderHelper::addDataFromFileAsync(const std::string& imagePath, const if (0 == _asyncRefCount) { - Director::getInstance()->getScheduler()->scheduleSelector(schedule_selector(DataReaderHelper::addDataAsyncCallBack), this, 0, false); + Director::getInstance()->getScheduler()->schedule(schedule_selector(DataReaderHelper::addDataAsyncCallBack), this, 0, false); } ++_asyncRefCount; @@ -466,7 +466,7 @@ void DataReaderHelper::addDataAsyncCallBack(float dt) if (0 == _asyncRefCount) { _asyncRefTotalCount = 0; - Director::getInstance()->getScheduler()->unscheduleSelector(schedule_selector(DataReaderHelper::addDataAsyncCallBack), this); + Director::getInstance()->getScheduler()->unschedule(schedule_selector(DataReaderHelper::addDataAsyncCallBack), this); } } } diff --git a/cocos/network/SocketIO.cpp b/cocos/network/SocketIO.cpp index 23e850d0f6..af7b295543 100644 --- a/cocos/network/SocketIO.cpp +++ b/cocos/network/SocketIO.cpp @@ -359,7 +359,7 @@ void SIOClientImpl::onOpen(WebSocket* ws) iter->second->onOpen(); } - Director::getInstance()->getScheduler()->scheduleSelector(schedule_selector(SIOClientImpl::heartbeat), this, (_heartbeat * .9f), false); + Director::getInstance()->getScheduler()->schedule(schedule_selector(SIOClientImpl::heartbeat), this, (_heartbeat * .9f), false); log("SIOClientImpl::onOpen socket connected!"); } diff --git a/cocos/network/WebSocket.cpp b/cocos/network/WebSocket.cpp index 16a001c6b2..4ba4b708a0 100644 --- a/cocos/network/WebSocket.cpp +++ b/cocos/network/WebSocket.cpp @@ -122,7 +122,7 @@ WsThreadHelper::WsThreadHelper() _UIWsMessageQueue = new std::list(); _subThreadWsMessageQueue = new std::list(); - Director::getInstance()->getScheduler()->scheduleUpdateForTarget(this, 0, false); + Director::getInstance()->getScheduler()->scheduleUpdate(this, 0, false); } WsThreadHelper::~WsThreadHelper() diff --git a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp index 00b78174f6..ea2f3a3971 100755 --- a/tests/Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp +++ b/tests/Classes/ExtensionsTest/CocoStudioSceneTest/TriggerCode/cons.cpp @@ -24,7 +24,7 @@ TimeElapsed::~TimeElapsed(void) bool TimeElapsed::init() { - _scheduler->scheduleSelector(schedule_selector(TimeElapsed::update), this, 0.0f , kRepeatForever, 0.0f, false); + _scheduler->schedule(schedule_selector(TimeElapsed::update), this, 0.0f , kRepeatForever, 0.0f, false); return true; } @@ -49,7 +49,7 @@ void TimeElapsed::serialize(const rapidjson::Value &val) void TimeElapsed::removeAll() { - _scheduler->unscheduleUpdateForTarget(this); + _scheduler->unschedule(schedule_selector(TimeElapsed::update), this); } void TimeElapsed::update(float dt) diff --git a/tests/Classes/PerformanceTest/PerformanceAllocTest.cpp b/tests/Classes/PerformanceTest/PerformanceAllocTest.cpp index 6559aec82e..e77122a13e 100644 --- a/tests/Classes/PerformanceTest/PerformanceAllocTest.cpp +++ b/tests/Classes/PerformanceTest/PerformanceAllocTest.cpp @@ -197,7 +197,7 @@ void PerformceAllocScene::onExitTransitionDidStart() auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector(SEL_SCHEDULE(&PerformceAllocScene::dumpProfilerInfo), this); + sched->unschedule(schedule_selector(PerformceAllocScene::dumpProfilerInfo), this); } void PerformceAllocScene::onEnterTransitionDidFinish() @@ -208,7 +208,7 @@ void PerformceAllocScene::onEnterTransitionDidFinish() auto sched = director->getScheduler(); CC_PROFILER_PURGE_ALL(); - sched->scheduleSelector(SEL_SCHEDULE(&PerformceAllocScene::dumpProfilerInfo), this, 2, false); + sched->schedule(schedule_selector(PerformceAllocScene::dumpProfilerInfo), this, 2, false); } void PerformceAllocScene::dumpProfilerInfo(float dt) diff --git a/tests/Classes/PerformanceTest/PerformanceContainerTest.cpp b/tests/Classes/PerformanceTest/PerformanceContainerTest.cpp index c8ac4a63a4..657c40b283 100644 --- a/tests/Classes/PerformanceTest/PerformanceContainerTest.cpp +++ b/tests/Classes/PerformanceTest/PerformanceContainerTest.cpp @@ -190,7 +190,7 @@ void PerformanceContainerScene::initWithQuantityOfNodes(unsigned int nNodes) auto sched = director->getScheduler(); CC_PROFILER_PURGE_ALL(); - sched->scheduleSelector(schedule_selector(PerformanceContainerScene::dumpProfilerInfo), this, 2, false); + sched->schedule(schedule_selector(PerformanceContainerScene::dumpProfilerInfo), this, 2, false); this->unscheduleUpdate(); this->scheduleUpdate(); @@ -208,7 +208,7 @@ void PerformanceContainerScene::initWithQuantityOfNodes(unsigned int nNodes) auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector(schedule_selector(PerformanceContainerScene::dumpProfilerInfo), this); + sched->unschedule(schedule_selector(PerformanceContainerScene::dumpProfilerInfo), this); this->unscheduleUpdate(); this->_startItem->setEnabled(true); diff --git a/tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp b/tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp index af0a9e850b..0aa49d2064 100644 --- a/tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp +++ b/tests/Classes/PerformanceTest/PerformanceEventDispatcherTest.cpp @@ -207,7 +207,7 @@ void PerformanceEventDispatcherScene::initWithQuantityOfNodes(unsigned int nNode auto sched = director->getScheduler(); CC_PROFILER_PURGE_ALL(); - sched->scheduleSelector(schedule_selector(PerformanceEventDispatcherScene::dumpProfilerInfo), this, 2, false); + sched->schedule(schedule_selector(PerformanceEventDispatcherScene::dumpProfilerInfo), this, 2, false); this->unscheduleUpdate(); this->scheduleUpdate(); @@ -225,7 +225,7 @@ void PerformanceEventDispatcherScene::initWithQuantityOfNodes(unsigned int nNode auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector(schedule_selector(PerformanceEventDispatcherScene::dumpProfilerInfo), this); + sched->unschedule(schedule_selector(PerformanceEventDispatcherScene::dumpProfilerInfo), this); this->unscheduleUpdate(); this->_startItem->setEnabled(true); diff --git a/tests/Classes/PerformanceTest/PerformanceLabelTest.cpp b/tests/Classes/PerformanceTest/PerformanceLabelTest.cpp index 6fb6ecaf5f..2f91a04792 100644 --- a/tests/Classes/PerformanceTest/PerformanceLabelTest.cpp +++ b/tests/Classes/PerformanceTest/PerformanceLabelTest.cpp @@ -350,19 +350,19 @@ void LabelMainScene::onEnter() auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->scheduleSelector(SEL_SCHEDULE(&LabelMainScene::updateText), this, 0.0f, false); + sched->schedule(schedule_selector(LabelMainScene::updateText), this, 0.0f, false); _vecFPS.clear(); _executeTimes = 0; - sched->scheduleSelector(SEL_SCHEDULE(&LabelMainScene::updateAutoTest), this, 0.2f, false); + sched->schedule(schedule_selector(LabelMainScene::updateAutoTest), this, 0.2f, false); } void LabelMainScene::onExit() { auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector(SEL_SCHEDULE(&LabelMainScene::updateText), this ); - sched->unscheduleSelector(SEL_SCHEDULE(&LabelMainScene::updateAutoTest), this ); + sched->unschedule(schedule_selector(LabelMainScene::updateText), this ); + sched->unschedule(schedule_selector(LabelMainScene::updateAutoTest), this ); Scene::onExit(); } diff --git a/tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp b/tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp index 3876465ad9..cf0fd19843 100644 --- a/tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp +++ b/tests/Classes/PerformanceTest/PerformanceNodeChildrenTest.cpp @@ -78,7 +78,7 @@ void NodeChildrenMenuLayer::onExitTransitionDidStart() auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector(SEL_SCHEDULE(&NodeChildrenMenuLayer::dumpProfilerInfo), this); + sched->unschedule(schedule_selector(NodeChildrenMenuLayer::dumpProfilerInfo), this); } void NodeChildrenMenuLayer::onEnterTransitionDidFinish() @@ -87,7 +87,7 @@ void NodeChildrenMenuLayer::onEnterTransitionDidFinish() auto sched = director->getScheduler(); CC_PROFILER_PURGE_ALL(); - sched->scheduleSelector(SEL_SCHEDULE(&NodeChildrenMenuLayer::dumpProfilerInfo), this, 2, false); + sched->schedule(schedule_selector(NodeChildrenMenuLayer::dumpProfilerInfo), this, 2, false); } diff --git a/tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp b/tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp index 1116337d5d..45c2f819d5 100644 --- a/tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp +++ b/tests/Classes/PerformanceTest/PerformanceSpriteTest.cpp @@ -596,7 +596,7 @@ void SpriteMainScene::onEnter() auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->scheduleSelector(SEL_SCHEDULE(&SpriteMainScene::updateAutoTest), this, 0.2f, false); + sched->schedule(schedule_selector(SpriteMainScene::updateAutoTest), this, 0.2f, false); } } @@ -608,7 +608,7 @@ void SpriteMainScene::onExit() auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector(SEL_SCHEDULE(&SpriteMainScene::updateAutoTest), this ); + sched->unschedule(schedule_selector(SpriteMainScene::updateAutoTest), this ); } Scene::onExit(); @@ -674,7 +674,7 @@ void SpriteMainScene::endAutoTest() auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector( SEL_SCHEDULE( &SpriteMainScene::updateAutoTest ), this ); + sched->unschedule( schedule_selector( SpriteMainScene::updateAutoTest ), this ); } void SpriteMainScene::nextAutoTest() @@ -713,7 +713,7 @@ void SpriteMainScene::finishAutoTest() SpriteMainScene::_s_autoTest = false; auto director = Director::getInstance(); auto sched = director->getScheduler(); - sched->unscheduleSelector( SEL_SCHEDULE( &SpriteMainScene::updateAutoTest ), this); + sched->unschedule( schedule_selector( SpriteMainScene::updateAutoTest ), this); auto autoTestMenu = dynamic_cast(getChildByTag(kTagAutoTestMenu)); if (nullptr != autoTestMenu) diff --git a/tests/Classes/SchedulerTest/SchedulerTest.cpp b/tests/Classes/SchedulerTest/SchedulerTest.cpp index 22ffdfe82a..37597f6cb6 100644 --- a/tests/Classes/SchedulerTest/SchedulerTest.cpp +++ b/tests/Classes/SchedulerTest/SchedulerTest.cpp @@ -431,7 +431,7 @@ void SchedulerUnscheduleAllHard::onExit() if(!_actionManagerActive) { // Restore the director's action manager. auto director = Director::getInstance(); - director->getScheduler()->scheduleUpdateForTarget(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); + director->getScheduler()->scheduleUpdate(director->getActionManager(), Scheduler::PRIORITY_SYSTEM, false); } SchedulerTestLayer::onExit(); @@ -965,11 +965,11 @@ void TwoSchedulers::onEnter() // Create a new scheduler, and link it to the main scheduler sched1 = new Scheduler(); - defaultScheduler->scheduleUpdateForTarget(sched1, 0, false); + defaultScheduler->scheduleUpdate(sched1, 0, false); // Create a new ActionManager, and link it to the new scheudler actionManager1 = new ActionManager(); - sched1->scheduleUpdateForTarget(actionManager1, 0, false); + sched1->scheduleUpdate(actionManager1, 0, false); for( unsigned int i=0; i < 10; i++ ) { @@ -991,11 +991,11 @@ void TwoSchedulers::onEnter() // Create a new scheduler, and link it to the main scheduler sched2 = new Scheduler();; - defaultScheduler->scheduleUpdateForTarget(sched2, 0, false); + defaultScheduler->scheduleUpdate(sched2, 0, false); // Create a new ActionManager, and link it to the new scheudler actionManager2 = new ActionManager(); - sched2->scheduleUpdateForTarget(actionManager2, 0, false); + sched2->scheduleUpdate(actionManager2, 0, false); for( unsigned int i=0; i < 10; i++ ) { auto sprite = Sprite::create("Images/grossinis_sister2.png"); @@ -1119,33 +1119,33 @@ std::string ScheduleCallbackTest::title() const std::string ScheduleCallbackTest::subtitle() const { return "\n\n\n\nPlease see console.\n\ -scheduleCallback(lambda, ...)\n\ -scheduleCallback(CC_CALLBACK_1(XXX::member_function), this), this, ...)\n\ -scheduleCallback(global_function, ...)\n\ +schedule(lambda, ...)\n\ +schedule(CC_CALLBACK_1(XXX::member_function), this), this, ...)\n\ +schedule(global_function, ...)\n\ "; } static void ScheduleCallbackTest_global_callback(float dt) { - log("In the callback of scheduleCallback(global_function, ...), dt = %f", dt); + log("In the callback of schedule(global_function, ...), dt = %f", dt); } void ScheduleCallbackTest::onEnter() { SchedulerTestLayer::onEnter(); - _scheduler->scheduleCallback([](float dt){ - log("In the callback of scheduleCallback(lambda, ...), dt = %f", dt); - }, this, "lambda", 1.0f, false); + _scheduler->schedule([](float dt){ + log("In the callback of schedule(lambda, ...), dt = %f", dt); + }, this, 1.0f, false, "lambda"); - _scheduler->scheduleCallback(CC_CALLBACK_1(ScheduleCallbackTest::callback, this), this, "member_function", 1.0f, false); + _scheduler->schedule(CC_CALLBACK_1(ScheduleCallbackTest::callback, this), this, 1.0f, false, "member_function"); - _scheduler->scheduleCallback(ScheduleCallbackTest_global_callback, this, "global_function", 1.0f, false); + _scheduler->schedule(ScheduleCallbackTest_global_callback, this, 1.0f, false, "global_function"); } void ScheduleCallbackTest::callback(float dt) { - log("In the callback of scheduleCallback(CC_CALLBACK_1(XXX::member_function), this), this, ...), dt = %f", dt); + log("In the callback of schedule(CC_CALLBACK_1(XXX::member_function), this), this, ...), dt = %f", dt); } //------------------------------------------------------------------ From 09c0bae4a130667efe7bc4716c8b7d8d991f400b Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 3 Mar 2014 11:07:48 +0800 Subject: [PATCH 56/69] closed #4165: Deprecates old methods: Scheduler::(un)scheduleSelector, Scheduler::isScheduleForTarget. --- cocos/2d/CCScheduler.h | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) diff --git a/cocos/2d/CCScheduler.h b/cocos/2d/CCScheduler.h index 9059611b7f..15e57f751b 100644 --- a/cocos/2d/CCScheduler.h +++ b/cocos/2d/CCScheduler.h @@ -361,8 +361,44 @@ public: */ void performFunctionInCocosThread( const std::function &function); + ///////////////////////////////////// + // Deprecated methods: + /** The scheduled method will be called every 'interval' seconds. + If paused is true, then it won't be called until it is resumed. + If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. + If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. + repeat let the action be repeated repeat + 1 times, use kRepeatForever to let the action run continuously + delay is the amount of time the action will wait before it'll start + @deprecated Please use 'Scheduler::schedule' instead. + @since v0.99.3, repeat and delay added in v1.1 + */ + CC_DEPRECATED_ATTRIBUTE void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, unsigned int repeat, float delay, bool paused) + { + schedule(selector, target, interval, repeat, delay, paused); + }; + + /** calls scheduleSelector with kRepeatForever and a 0 delay + * @deprecated Please use 'Scheduler::schedule' instead. + */ + CC_DEPRECATED_ATTRIBUTE void scheduleSelector(SEL_SCHEDULE selector, Ref *target, float interval, bool paused) + { + schedule(selector, target, interval, paused); + }; + + /** Unschedule a selector for a given target. + If you want to unschedule the "update", use unscheudleUpdateForTarget. + @deprecated Please use 'Scheduler::schedule' instead. + @since v0.99.3 + */ + CC_DEPRECATED_ATTRIBUTE void unscheduleSelector(SEL_SCHEDULE selector, Ref *target) { unschedule(selector, target); }; + + /** Checks whether a selector for a given taget is scheduled. + @deprecated Please use 'Scheduler::isScheduled' instead. + @since v0.99.3 + */ + CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduled(selector, target); }; protected: From 04663b4a9c2cd95bb65a670385ddb6e6a4c5fe15 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 3 Mar 2014 11:12:04 +0800 Subject: [PATCH 57/69] closed #4165: Updates comments. --- cocos/2d/CCScheduler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/cocos/2d/CCScheduler.h b/cocos/2d/CCScheduler.h index 15e57f751b..b3e40d67d4 100644 --- a/cocos/2d/CCScheduler.h +++ b/cocos/2d/CCScheduler.h @@ -202,7 +202,7 @@ public: /** The scheduled method will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. - If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. + If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the 'callback' is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start @@ -219,7 +219,7 @@ public: /** The scheduled method will be called every 'interval' seconds. If paused is true, then it won't be called until it is resumed. - If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdateForTarget:' instead. + If 'interval' is 0, it will be called every frame, but if so, it's recommended to use 'scheduleUpdate' instead. If the selector is already scheduled, then only the interval parameter will be updated without re-scheduling it again. repeat let the action be repeated repeat + 1 times, use kRepeatForever to let the action run continuously delay is the amount of time the action will wait before it'll start @@ -265,7 +265,7 @@ public: void unschedule(const std::string& key, void *target); /** Unschedule a selector for a given target. - If you want to unschedule the "update", use unscheudleUpdateForTarget. + If you want to unschedule the "update", use unscheudleUpdate. @since v3.0 */ void unschedule(SEL_SCHEDULE selector, Ref *target); From 1d2d2df1e9ec44de405427767fba742128a06a8f Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 3 Mar 2014 11:57:36 +0800 Subject: [PATCH 58/69] issue #4165: Adds missing deprecated methods in Scheduler class. --- cocos/2d/CCScheduler.h | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) diff --git a/cocos/2d/CCScheduler.h b/cocos/2d/CCScheduler.h index b3e40d67d4..05b4cd3122 100644 --- a/cocos/2d/CCScheduler.h +++ b/cocos/2d/CCScheduler.h @@ -387,9 +387,18 @@ public: schedule(selector, target, interval, paused); }; + /** Schedules the 'update' selector for a given target with a given priority. + The 'update' selector will be called every frame. + The lower the priority, the earlier it is called. + @deprecated Please use 'Scheduler::scheduleUpdate' instead. + @since v0.99.3 + */ + template + CC_DEPRECATED_ATTRIBUTE void scheduleUpdateForTarget(T* target, int priority, bool paused) { scheduleUpdate(target, priority, paused); }; + /** Unschedule a selector for a given target. If you want to unschedule the "update", use unscheudleUpdateForTarget. - @deprecated Please use 'Scheduler::schedule' instead. + @deprecated Please use 'Scheduler::unschedule' instead. @since v0.99.3 */ CC_DEPRECATED_ATTRIBUTE void unscheduleSelector(SEL_SCHEDULE selector, Ref *target) { unschedule(selector, target); }; @@ -400,6 +409,12 @@ public: */ CC_DEPRECATED_ATTRIBUTE bool isScheduledForTarget(Ref *target, SEL_SCHEDULE selector) { return isScheduled(selector, target); }; + /** Unschedules the update selector for a given target + @deprecated Please use 'Scheduler::unscheduleUpdate' instead. + @since v0.99.3 + */ + CC_DEPRECATED_ATTRIBUTE void unscheduleUpdateForTarget(Ref *target) { return unscheduleUpdate(target); }; + protected: /** Schedules the 'callback' function for a given target with a given priority. From 336dc9f7fceca02b4899b5dabc6a58161dd781a3 Mon Sep 17 00:00:00 2001 From: minggo Date: Mon, 3 Mar 2014 14:11:28 +0800 Subject: [PATCH 59/69] check validation of ndk root --- install.py | 52 +++++++++++++++++++++++++++------------------------- 1 file changed, 27 insertions(+), 25 deletions(-) diff --git a/install.py b/install.py index d2e422196c..e5fbda02b4 100755 --- a/install.py +++ b/install.py @@ -35,6 +35,7 @@ NDK_ROOT = 'NDK_ROOT1' class SetEnvVar: current_absolute_path = os.path.dirname(os.path.realpath(__file__)) + ndk_root = None @staticmethod def _isWindows(): @@ -68,12 +69,6 @@ class SetEnvVar: file.write('export PATH=$%s:$PATH\n' % key) file.close() - # make it take effect immediately - cmd = 'source ' + profile_path - p = os.popen(cmd) - p.close() - - @staticmethod def _set_environment_variable(key, value): @@ -103,36 +98,39 @@ class SetEnvVar: @staticmethod def _get_ndk_root(): - ndk_root = None - # python on linux doesn't include Tkinter model, so let user input in terminal if SetEnvVar._isLinux(): - print "not linux" while True: - ndk_root = raw_input('Enter path of ndk, press enter to skip: ') - if not ndk_root: + input_value = raw_input('Enter path of ndk, press enter to skip: ') + if not input_value: break - if not os.path.exists(ndk_root): - print 'input path %s does not exist' % ndk_root - else: + if os.path.exists(input_value): + if SetEnvVar._check_validation_ndk_root(input_value): + print 'warning: %s is not valid path of ndk root' % input_value + break + + SetEnvVar.ndk_root = input_value else: # pop up a window to let user select path for ndk root import Tkinter, tkFileDialog try: - ndk_root = os.environ[NDK_ROOT] + SetEnvVar.ndk_root = os.environ[NDK_ROOT] except Exception: root = Tkinter.Tk() SetEnvVar._center(root) def callback(): - ndk_root = tkFileDialog.askdirectory() + SetEnvVar.ndk_root = tkFileDialog.askdirectory() root.destroy() + # check out if it is a real ndk root + if not SetEnvVar._check_validation_ndk_root(SetEnvVar.ndk_root): + print 'warning: %s is not a valid path of ndk root' % SetEnvVar.ndk_root frame = Tkinter.Frame(root) Tkinter.Label(frame, text='select path for ndk root').pack(side=Tkinter.LEFT) @@ -140,7 +138,13 @@ class SetEnvVar: frame.pack() root.mainloop() - return ndk_root + @staticmethod + def _check_validation_ndk_root(ndk_root): + ndk_build_path = os.path.join(ndk_root, 'ndk-build') + if os.path.isfile(ndk_build_path): + return True + else: + return False # display a window in center and put it on top @staticmethod @@ -158,17 +162,15 @@ class SetEnvVar: def set_ndk_root(value): if value: - ndk_root = value + SetEnvVar.ndk_root = value else: - ndk_root = SetEnvVar._get_ndk_root() + SetEnvVar._get_ndk_root() - print "ndk_root is %s" % ndk_root + print "ndk_root is %s" % SetEnvVar.ndk_root - if ndk_root: - os.environ[NDK_ROOT] = ndk_root - SetEnvVar._set_environment_variable(NDK_ROOT, ndk_root) - -usage = "" + if SetEnvVar.ndk_root: + os.environ[NDK_ROOT] = SetEnvVar.ndk_root + SetEnvVar._set_environment_variable(NDK_ROOT, SetEnvVar.ndk_root) if __name__ == '__main__': From fdcbfa2eca0016c1b8e5fd2c11d5e7e59bdf897e Mon Sep 17 00:00:00 2001 From: boyu0 Date: Mon, 3 Mar 2014 14:35:44 +0800 Subject: [PATCH 60/69] closed #4150: add const to getPosition/RotationOffset method. --- cocos/physics/CCPhysicsBody.cpp | 4 ++-- cocos/physics/CCPhysicsBody.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/cocos/physics/CCPhysicsBody.cpp b/cocos/physics/CCPhysicsBody.cpp index 2f075d311e..dd577231be 100644 --- a/cocos/physics/CCPhysicsBody.cpp +++ b/cocos/physics/CCPhysicsBody.cpp @@ -836,7 +836,7 @@ void PhysicsBody::setPositionOffset(const Point& position) } } -Point PhysicsBody::getPositionOffset() +Point PhysicsBody::getPositionOffset() const { return _positionOffset; } @@ -851,7 +851,7 @@ void PhysicsBody::setRotationOffset(float rotation) } } -float PhysicsBody::getRotationOffset() +float PhysicsBody::getRotationOffset() const { return _rotationOffset; } diff --git a/cocos/physics/CCPhysicsBody.h b/cocos/physics/CCPhysicsBody.h index 4f4f9a2425..ea09a7f2f1 100644 --- a/cocos/physics/CCPhysicsBody.h +++ b/cocos/physics/CCPhysicsBody.h @@ -195,11 +195,11 @@ public: /** set body position offset, it's the position witch relative to node */ void setPositionOffset(const Point& position); /** get body position offset. */ - Point getPositionOffset(); + Point getPositionOffset() const; /** set body rotation offset, it's the rotation witch relative to node */ void setRotationOffset(float rotation); /** set the body rotation offset */ - float getRotationOffset(); + float getRotationOffset() const; /** * @brief test the body is dynamic or not. From 8f1ba73a525f6307c66d9e8ee524281c797c2669 Mon Sep 17 00:00:00 2001 From: yinkaile Date: Mon, 3 Mar 2014 14:56:56 +0800 Subject: [PATCH 61/69] fixed add ParticleSystem display crashed --- cocos/editor-support/cocostudio/CCDisplayFactory.cpp | 1 + cocos/editor-support/cocostudio/CCDisplayManager.cpp | 1 + 2 files changed, 2 insertions(+) diff --git a/cocos/editor-support/cocostudio/CCDisplayFactory.cpp b/cocos/editor-support/cocostudio/CCDisplayFactory.cpp index 72428edfff..41430ed223 100644 --- a/cocos/editor-support/cocostudio/CCDisplayFactory.cpp +++ b/cocos/editor-support/cocostudio/CCDisplayFactory.cpp @@ -262,6 +262,7 @@ void DisplayFactory::createParticleDisplay(Bone *bone, DecorativeDisplay *decoDi ParticleSystem *system = ParticleSystemQuad::create(displayData->displayName.c_str()); system->removeFromParent(); + system->cleanup(); Armature *armature = bone->getArmature(); if (armature) diff --git a/cocos/editor-support/cocostudio/CCDisplayManager.cpp b/cocos/editor-support/cocostudio/CCDisplayManager.cpp index 70863f5f92..250180bf0a 100644 --- a/cocos/editor-support/cocostudio/CCDisplayManager.cpp +++ b/cocos/editor-support/cocostudio/CCDisplayManager.cpp @@ -170,6 +170,7 @@ void DisplayManager::addDisplay(Node *display, int index) displayData = ParticleDisplayData::create(); display->removeFromParent(); + display->cleanup(); Armature *armature = _bone->getArmature(); if (armature) From 7d2db27caec22bc0545435238c171ad4d7f97ff7 Mon Sep 17 00:00:00 2001 From: andyque Date: Thu, 27 Feb 2014 19:51:11 +0800 Subject: [PATCH 62/69] fixed #3599. use a scheduler to fix the position of editbox when it's parent postion has been changed --- extensions/GUI/CCEditBox/CCEditBox.cpp | 13 +++++++++++++ extensions/GUI/CCEditBox/CCEditBox.h | 1 + extensions/GUI/CCEditBox/CCEditBoxImpl.h | 5 +++++ extensions/GUI/CCEditBox/CCEditBoxImplIOS.h | 2 +- extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm | 10 +++++++++- extensions/GUI/CCEditBox/CCEditBoxImplMac.h | 1 + extensions/GUI/CCEditBox/CCEditBoxImplMac.mm | 8 ++++++++ 7 files changed, 38 insertions(+), 2 deletions(-) diff --git a/extensions/GUI/CCEditBox/CCEditBox.cpp b/extensions/GUI/CCEditBox/CCEditBox.cpp index dda578f421..6fe32a766c 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.cpp +++ b/extensions/GUI/CCEditBox/CCEditBox.cpp @@ -28,6 +28,8 @@ NS_CC_EXT_BEGIN +static const float CHECK_EDITBOX_POSITION_INTERVAL = 0.1f; + EditBox::EditBox(void) : _editBoxImpl(NULL) , _delegate(NULL) @@ -332,8 +334,19 @@ void EditBox::onEnter(void) { _editBoxImpl->onEnter(); } +#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS || CC_TARGET_PLATFORM == CC_PLATFORM_MAC) + this->schedule(schedule_selector(EditBox::updatePosition), CHECK_EDITBOX_POSITION_INTERVAL); +#endif } +void EditBox::updatePosition(float dt) +{ + if (nullptr != _editBoxImpl) { + _editBoxImpl->updatePosition(dt); + } +} + + void EditBox::onExit(void) { ControlButton::onExit(); diff --git a/extensions/GUI/CCEditBox/CCEditBox.h b/extensions/GUI/CCEditBox/CCEditBox.h index 675dda2bfe..4b1ed288f7 100644 --- a/extensions/GUI/CCEditBox/CCEditBox.h +++ b/extensions/GUI/CCEditBox/CCEditBox.h @@ -418,6 +418,7 @@ public: void touchDownAction(Ref *sender, Control::EventType controlEvent); protected: + void updatePosition(float dt); EditBoxImpl* _editBoxImpl; EditBoxDelegate* _delegate; diff --git a/extensions/GUI/CCEditBox/CCEditBoxImpl.h b/extensions/GUI/CCEditBox/CCEditBoxImpl.h index 7cb6c6ed1c..b066ac7550 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImpl.h +++ b/extensions/GUI/CCEditBox/CCEditBoxImpl.h @@ -69,6 +69,11 @@ public: virtual void setVisible(bool visible) = 0; virtual void setContentSize(const Size& size) = 0; virtual void setAnchorPoint(const Point& anchorPoint) = 0; + + /** + * check the editbox's position, update it when needed + */ + virtual void updatePosition(float dt){}; /** * @js NA * @lua NA diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h index ce088445d3..b64208f4d2 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h +++ b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.h @@ -101,6 +101,7 @@ public: virtual void setVisible(bool visible); virtual void setContentSize(const Size& size); virtual void setAnchorPoint(const Point& anchorPoint); + virtual void updatePosition(float dt) override; /** * @js NA * @lua NA @@ -116,7 +117,6 @@ public: virtual void closeKeyboard(); virtual void onEndEditing(); - private: void initInactiveLabels(const Size& size); void setInactiveText(const char* pText); diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm index 0b035986fd..cbdd1b9185 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplIOS.mm @@ -614,7 +614,6 @@ void EditBoxImplIOS::setAnchorPoint(const Point& anchorPoint) void EditBoxImplIOS::visit(void) { - } void EditBoxImplIOS::onEnter(void) @@ -626,6 +625,15 @@ void EditBoxImplIOS::onEnter(void) } } +void EditBoxImplIOS::updatePosition(float dt) +{ + if (nullptr != _systemControl) { + this->adjustTextFieldPosition(); + } +} + + + void EditBoxImplIOS::adjustTextFieldPosition() { Size contentSize = _editBox->getContentSize(); diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.h b/extensions/GUI/CCEditBox/CCEditBoxImplMac.h index 481472dba3..76ad6f9966 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.h +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.h @@ -107,6 +107,7 @@ public: virtual void doAnimationWhenKeyboardMove(float duration, float distance); virtual void openKeyboard(); virtual void closeKeyboard(); + virtual void updatePosition(float dt) override; /** * @js NA * @lua NA diff --git a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm index 31805a9b2b..94567b6356 100644 --- a/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm +++ b/extensions/GUI/CCEditBox/CCEditBoxImplMac.mm @@ -382,6 +382,14 @@ NSPoint EditBoxImplMac::convertDesignCoordToScreenCoord(const Point& designCoord return screenPos; } +void EditBoxImplMac::updatePosition(float dt) +{ + if(nullptr != _sysEdit) + { + adjustTextFieldPosition(); + } +} + void EditBoxImplMac::adjustTextFieldPosition() { Size contentSize = _editBox->getContentSize(); From aeecee86a4e53394b6302fe6c4795e5d2b865e78 Mon Sep 17 00:00:00 2001 From: James Chen Date: Mon, 3 Mar 2014 17:14:16 +0800 Subject: [PATCH 63/69] Update CHANGELOG [ci skip] --- CHANGELOG | 1 + 1 file changed, 1 insertion(+) diff --git a/CHANGELOG b/CHANGELOG index 63ff949ec2..c012ff74a3 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -17,6 +17,7 @@ cocos2d-x-3.0rc0 Feb.?? 2014 [NEW] Language: Added Dutch support. [NEW] Sprite: Added auto-culling support + [FIX] EditBox's position would not be updated if its parent's position changed. [FIX] spine::Skeleton would not be updated after being re-added to scene. [FIX] Loading custom fonts from ttf file fails on windows. [FIX] FadeIn and FadeOut behaviours is incorrect if it doesn't start from an edge value( 0 or 255). From 7650cbc8c1afe9e32c7895309b87f633bafdce0c Mon Sep 17 00:00:00 2001 From: lm Date: Mon, 3 Mar 2014 17:32:29 +0800 Subject: [PATCH 64/69] [jenkins]Add [ci rebuild] command via pr comments --- tools/jenkins-scripts/job-comment-trigger.py | 97 ++++++++++++++++++++ 1 file changed, 97 insertions(+) create mode 100644 tools/jenkins-scripts/job-comment-trigger.py diff --git a/tools/jenkins-scripts/job-comment-trigger.py b/tools/jenkins-scripts/job-comment-trigger.py new file mode 100644 index 0000000000..bd60de27bc --- /dev/null +++ b/tools/jenkins-scripts/job-comment-trigger.py @@ -0,0 +1,97 @@ +#Github pull reqest builder for Jenkins + +import json +import re +import os +import requests +import sys +import traceback +import urllib2 + +def main(): + #get payload from os env + payload_str = os.environ['payload'] + #parse to json obj + payload = json.loads(payload_str) + + comment = payload['comment'] + #get comment body + comment_body = comment['body'] + print comment_body + if(cmp(comment_body.upper(),'[ci rebuild]'.upper()) != 0) : + return(0) + + issue = payload['issue'] + #get pull number + pr_num = issue['number'] + print 'pr_num:' + str(pr_num) + payload_forword = {"number":pr_num} + + #build for pull request action 'open' and 'synchronize', skip 'close' + action = issue['state'] + print 'action: ' + action + payload_forword['action'] = action + + pr = issue['pull_request'] + url = pr['html_url'] + print "url:" + url + payload_forword['html_url'] = url + + #get pull request info + req = 'https://api.github.com/repos/aotedan/test_hook/pulls/' + str(pr_num) + pr_payload = '' + try: + pr_payload = urllib2.urlopen(req).read() + except: + traceback.print_exc() + + repository = json.loads(pr_payload) + #get statuses url + statuses_url = repository['statuses_url'] + payload_forword['statuses_url'] = statuses_url + print 'statuses_url: ' + statuses_url + + #get pr target branch + branch = repository['base']['ref'] + payload_forword['branch'] = branch + print 'branch: ' + branch + + #set commit status to pending + target_url = os.environ['JOB_PULL_REQUEST_BUILD_URL'] + + if(action == 'closed'): + print 'pull request #' + str(pr_num) + ' is '+action+', no build triggered' + return(0) + + r = requests.get(pr['url']+"/commits") + commits = r.json() + last_commit = commits[len(commits)-1] + message = last_commit['commit']['message'] + + data = {"state":"pending", "target_url":target_url} + access_token = os.environ['GITHUB_ACCESS_TOKEN'] + Headers = {"Authorization":"token " + access_token} + + try: + requests.post(statuses_url, data=json.dumps(data), headers=Headers) + except: + traceback.print_exc() + + job_trigger_url = os.environ['JOB_TRIGGER_URL'] + #send trigger and payload + post_data = {'payload':""} + post_data['payload']= json.dumps(payload_forword) + requests.post(job_trigger_url, data=post_data) + + return(0) + +# -------------- main -------------- +if __name__ == '__main__': + sys_ret = 0 + try: + sys_ret = main() + except: + traceback.print_exc() + sys_ret = 1 + finally: + sys.exit(sys_ret) From f2e9ae97e20e623359aa89f8d6eae46ad58a39ef Mon Sep 17 00:00:00 2001 From: qiaofeng00oo Date: Mon, 3 Mar 2014 17:47:55 +0800 Subject: [PATCH 65/69] modify autotest.py in tools/jenkins-scripts --- tools/jenkins-scripts/autotest.py | 75 +++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100755 tools/jenkins-scripts/autotest.py diff --git a/tools/jenkins-scripts/autotest.py b/tools/jenkins-scripts/autotest.py new file mode 100755 index 0000000000..a5ac0df1a2 --- /dev/null +++ b/tools/jenkins-scripts/autotest.py @@ -0,0 +1,75 @@ +import os +import sys +import subprocess +import socket +import time + +HOST = 'localhost' +PORT = 5678 + +def autotest(): + soc = socket.socket( socket.AF_INET, socket.SOCK_STREAM ) + soc.connect((HOST, PORT)) + time.sleep(3) + print 'autotest run:' + soc.send('autotest run\r\n') + + while True: + buf = soc.recv(64) + print buf + + print 'test end and close socket.' + soc.close() + +#----------------autotest build and run----------------# +sleep_time = 1.5 +def cleanProj(): + infoClean = os.system('xcodebuild -project ./build/cocos2d_tests.xcodeproj -target Test\ cpp\ Mac clean') + print 'infoClean: ', infoClean + if infoClean != 0: + print 'clean **CLEAN FAILED**' + time.sleep(sleep_time) +def buildProj(): + infoBuild = os.system('xcodebuild -project ./build/cocos2d_tests.xcodeproj -target Test\ cpp\ Mac') + print 'infoBuild: ', infoBuild + if infoBuild != 0: + print 'build **BUILD FAILED**' + time.sleep(sleep_time) + return infoBuild +def openProj(): + cmd = 'open ./build/build/Debug/Test\ cpp\ Mac.app' + print 'cmd: ', cmd + infoOpen = os.system(cmd) + print 'infoOpen: ', infoOpen + if infoOpen != 0: + print 'open **OPEN FAILED**' + time.sleep(sleep_time) +def buildAndRun(): + # cleanProj() + if buildProj() != 0: + cleanProj() + buildProj() + openProj() + time.sleep(sleep_time) +#----------------autotest build and run end----------------# + +def main(): + try: + buildAndRun() + except Exception, e: + print 'BUILD FAILED!' + else: + autotest() + + +# -------------- main -------------- +if __name__ == '__main__': + sys_ret = 0 + try: + sys_ret = main() + except: + traceback.print_exc() + sys_ret = 1 + finally: + sys.exit(sys_ret) + From e0a9020de7a403e454dc94796238fada0d95334f Mon Sep 17 00:00:00 2001 From: lm Date: Mon, 3 Mar 2014 18:36:32 +0800 Subject: [PATCH 66/69] [Jenkins] User regex pattern to parse comment body --- tools/jenkins-scripts/job-comment-trigger.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tools/jenkins-scripts/job-comment-trigger.py b/tools/jenkins-scripts/job-comment-trigger.py index bd60de27bc..64a2d9656e 100644 --- a/tools/jenkins-scripts/job-comment-trigger.py +++ b/tools/jenkins-scripts/job-comment-trigger.py @@ -18,7 +18,10 @@ def main(): #get comment body comment_body = comment['body'] print comment_body - if(cmp(comment_body.upper(),'[ci rebuild]'.upper()) != 0) : + pattern = re.compile("\[ci(\s+)rebuild\]", re.I) + result = pattern.search(comment_body) + if result is None: + print 'skip build for pull request #' + str(pr_num) return(0) issue = payload['issue'] From 81f5254e1506dd53f1dcb395e34e61843b22f918 Mon Sep 17 00:00:00 2001 From: Ricardo Quesada Date: Mon, 3 Mar 2014 16:08:30 -0800 Subject: [PATCH 67/69] Removes setNormalizedPosition This funciton is useful, but the code is buggy. In should check the parents' position instead of Director::Size() Let's do it correctly, and then re-add this function --- cocos/2d/CCNode.cpp | 15 --------------- cocos/2d/CCNode.h | 10 ---------- 2 files changed, 25 deletions(-) diff --git a/cocos/2d/CCNode.cpp b/cocos/2d/CCNode.cpp index 456517391a..3410c2d399 100644 --- a/cocos/2d/CCNode.cpp +++ b/cocos/2d/CCNode.cpp @@ -491,21 +491,6 @@ void Node::setPositionZ(float positionZ) setGlobalZOrder(positionZ); } -void Node::setNormalizedPosition(const cocos2d::Point &position) -{ - _normalizedPosition = position; - Size s = Director::getInstance()->getVisibleSize(); - Point p; - p.x = s.width * position.x; - p.y = s.height * position.y; - setPosition(p); -} - -const Point& Node::getNormalizedPosition() const -{ - return _normalizedPosition; -} - ssize_t Node::getChildrenCount() const { return _children.size(); diff --git a/cocos/2d/CCNode.h b/cocos/2d/CCNode.h index bd88ec0b2f..fbb506d371 100644 --- a/cocos/2d/CCNode.h +++ b/cocos/2d/CCNode.h @@ -386,15 +386,6 @@ public: virtual float getPositionZ() const; CC_DEPRECATED_ATTRIBUTE virtual float getVertexZ() const { return getPositionZ(); } - /** Sets the position using normalized coordinates. - - (0,0) means bottom,left corner - - (1,1) means top,right corner - - (0.5,0.5) means center - */ - virtual void setNormalizedPosition(const Point& position); - /** returns the normalized position */ - const Point& getNormalizedPosition() const; - /** * Changes the X skew angle of the node in degrees. * @@ -1499,7 +1490,6 @@ protected: Point _position; ///< position of the node float _positionZ; ///< OpenGL real Z position - Point _normalizedPosition; ///< position in normalized coordinates float _skewX; ///< skew angle on x-axis float _skewY; ///< skew angle on y-axis From 62ffb8e9953a4ea52589b1ff6330bb6f581b86db Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Mar 2014 09:45:08 +0800 Subject: [PATCH 68/69] Renames 'template' to 'templates' --- .../multi-platform-cpp/CMakeLists.txt | 0 .../multi-platform-cpp/Classes/AppDelegate.cpp | 0 .../multi-platform-cpp/Classes/AppDelegate.h | 0 .../multi-platform-cpp/Classes/HelloWorldScene.cpp | 0 .../multi-platform-cpp/Classes/HelloWorldScene.h | 0 .../Resources/HelloWorld.png.REMOVED.git-id | 0 .../multi-platform-cpp/proj.android/.classpath | 0 .../multi-platform-cpp/proj.android/.project | 0 .../proj.android/AndroidManifest.xml | 0 .../multi-platform-cpp/proj.android/README.md | 0 .../multi-platform-cpp/proj.android/ant.properties | 0 .../multi-platform-cpp/proj.android/build.xml | 0 .../multi-platform-cpp/proj.android/build_native.py | 0 .../multi-platform-cpp/proj.android/jni/Android.mk | 0 .../proj.android/jni/Application.mk | 0 .../proj.android/jni/hellocpp/main.cpp | 0 .../proj.android/proguard-project.txt | 0 .../proj.android/project.properties | 0 .../proj.android/res/values/strings.xml | 0 .../src/org/cocos2dx/cpp/Cocos2dxActivity.java | 0 .../proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj | 0 .../proj.ios_mac/ios/AppController.h | 0 .../proj.ios_mac/ios/AppController.mm | 0 .../ios/Default-568h@2x.png.REMOVED.git-id | 0 .../proj.ios_mac/ios/Default@2x.png.REMOVED.git-id | 0 .../multi-platform-cpp/proj.ios_mac/ios/Prefix.pch | 0 .../proj.ios_mac/ios/RootViewController.h | 0 .../proj.ios_mac/ios/RootViewController.mm | 0 .../multi-platform-cpp/proj.ios_mac/ios/main.m | 0 .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 0 .../multi-platform-cpp/proj.ios_mac/mac/Prefix.pch | 0 .../multi-platform-cpp/proj.ios_mac/mac/main.cpp | 0 .../multi-platform-cpp/proj.linux/main.cpp | 0 .../multi-platform-cpp/proj.win32/HelloCpp.sln | 0 .../multi-platform-cpp/proj.win32/HelloCpp.vcxproj | 0 .../proj.win32/HelloCpp.vcxproj.filters | 0 .../proj.win32/HelloCpp.vcxproj.user | 0 .../multi-platform-cpp/proj.win32/game.rc | 0 .../multi-platform-cpp/proj.win32/main.cpp | 0 .../multi-platform-cpp/proj.win32/main.h | 0 .../multi-platform-cpp/proj.win32/res/game.ico | Bin .../multi-platform-cpp/proj.win32/resource.h | 0 .../multi-platform-js-runtime/cocos2d-jsb.js | 0 .../framework/Classes/AppDelegate.cpp | 0 .../framework/Classes/AppDelegate.h | 0 .../framework/Classes/Runtime.cpp | 0 .../framework/Classes/Runtime.h | 0 .../framework/build_runtime.py | 0 .../framework/proj.android/.classpath | 0 .../framework/proj.android/.project | 0 .../framework/proj.android/AndroidManifest.xml | 0 .../framework/proj.android/README.md | 0 .../framework/proj.android/ant.properties | 0 .../framework/proj.android/build.xml | 0 .../framework/proj.android/build_native.py | 0 .../framework/proj.android/custom_rules.xml | 0 .../framework/proj.android/jni/Android.mk | 0 .../framework/proj.android/jni/Application.mk | 0 .../jni/hellojavascript/Runtime_android.cpp | 0 .../proj.android/jni/hellojavascript/main.cpp | 0 .../framework/proj.android/proguard-project.txt | 0 .../framework/proj.android/project.properties | 0 .../framework/proj.android/res/values/strings.xml | 0 .../org/cocos2dx/javascript/Cocos2dxActivity.java | 0 .../HelloJavascript.xcodeproj/project.pbxproj | 0 .../framework/proj.ios_mac/Runtime_ios-mac.mm | 0 .../framework/proj.ios_mac/ios/AppController.h | 0 .../framework/proj.ios_mac/ios/AppController.mm | 0 .../ios/Default-568h@2x.png.REMOVED.git-id | 0 .../proj.ios_mac/ios/Default@2x.png.REMOVED.git-id | 0 .../framework/proj.ios_mac/ios/Prefix.pch | 0 .../framework/proj.ios_mac/ios/RootViewController.h | 0 .../proj.ios_mac/ios/RootViewController.mm | 0 .../framework/proj.ios_mac/ios/main.m | 0 .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 0 .../framework/proj.ios_mac/mac/MainMenu.xib | 0 .../framework/proj.ios_mac/mac/Prefix.pch | 0 .../framework/proj.ios_mac/mac/SimulatorApp.h | 0 .../framework/proj.ios_mac/mac/SimulatorApp.mm | 0 .../framework/proj.ios_mac/mac/main.m | 0 .../framework/proj.win32/HelloJavascript.sln | 0 .../framework/proj.win32/HelloJavascript.vcxproj | 0 .../proj.win32/HelloJavascript.vcxproj.filters | 0 .../proj.win32/HelloJavascript.vcxproj.user | 0 .../framework/proj.win32/Runtime_win32.cpp | 0 .../framework/proj.win32/SimulatorWindow.cpp | 0 .../framework/proj.win32/SimulatorWindow.h | 0 .../framework/proj.win32/game.rc | 0 .../framework/proj.win32/main.cpp | 0 .../framework/proj.win32/main.h | 0 .../framework/proj.win32/res/game.ico | Bin .../framework/proj.win32/resource.h | 0 .../res/HelloWorld.png.REMOVED.git-id | 0 .../android/CocosPlayer.apk.REMOVED.git-id | 0 .../runtime/CocosPlayer/ios/ios-sim | Bin .../multi-platform-js-runtime/src/app.js | 0 .../multi-platform-js-runtime/src/resource.js | 0 .../multi-platform-js/CMakeLists.txt | 0 .../multi-platform-js/Classes/AppDelegate.cpp | 0 .../multi-platform-js/Classes/AppDelegate.h | 0 .../multi-platform-js/Resources/cocos2d-jsb.js | 0 .../Resources/res/HelloWorld.png.REMOVED.git-id | 0 .../multi-platform-js/Resources/src/myApp.js | 0 .../multi-platform-js/Resources/src/resource.js | 0 .../multi-platform-js/proj.android/.classpath | 0 .../multi-platform-js/proj.android/.project | 0 .../proj.android/AndroidManifest.xml | 0 .../multi-platform-js/proj.android/README.md | 0 .../multi-platform-js/proj.android/ant.properties | 0 .../multi-platform-js/proj.android/build.xml | 0 .../multi-platform-js/proj.android/build_native.py | 0 .../multi-platform-js/proj.android/jni/Android.mk | 0 .../proj.android/jni/Application.mk | 0 .../proj.android/jni/hellojavascript/main.cpp | 0 .../proj.android/proguard-project.txt | 0 .../proj.android/project.properties | 0 .../proj.android/res/values/strings.xml | 0 .../org/cocos2dx/javascript/Cocos2dxActivity.java | 0 .../HelloJavascript.xcodeproj/project.pbxproj | 0 .../proj.ios_mac/ios/AppController.h | 0 .../proj.ios_mac/ios/AppController.mm | 0 .../ios/Default-568h@2x.png.REMOVED.git-id | 0 .../proj.ios_mac/ios/Default@2x.png.REMOVED.git-id | 0 .../multi-platform-js/proj.ios_mac/ios/Prefix.pch | 0 .../proj.ios_mac/ios/RootViewController.h | 0 .../proj.ios_mac/ios/RootViewController.mm | 0 .../multi-platform-js/proj.ios_mac/ios/main.m | 0 .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 0 .../multi-platform-js/proj.ios_mac/mac/Prefix.pch | 0 .../multi-platform-js/proj.ios_mac/mac/main.cpp | 0 .../multi-platform-js/proj.linux/main.cpp | 0 .../proj.win32/HelloJavascript.sln | 0 .../proj.win32/HelloJavascript.vcxproj | 0 .../proj.win32/HelloJavascript.vcxproj.filters | 0 .../proj.win32/HelloJavascript.vcxproj.user | 0 .../multi-platform-js/proj.win32/game.rc | 0 .../multi-platform-js/proj.win32/main.cpp | 0 .../multi-platform-js/proj.win32/main.h | 0 .../multi-platform-js/proj.win32/res/game.ico | Bin .../multi-platform-js/proj.win32/resource.h | 0 .../multi-platform-lua/CMakeLists.txt | 0 .../multi-platform-lua/Classes/AppDelegate.cpp | 0 .../multi-platform-lua/Classes/AppDelegate.h | 0 .../Resources/background.mp3.REMOVED.git-id | 0 .../Resources/farm.jpg.REMOVED.git-id | 0 .../multi-platform-lua/Resources/hello.lua | 0 .../multi-platform-lua/Resources/hello2.lua | 0 .../multi-platform-lua/Resources/mobdebug.lua | 0 .../multi-platform-lua/proj.android/.classpath | 0 .../multi-platform-lua/proj.android/.project | 0 .../proj.android/AndroidManifest.xml | 0 .../multi-platform-lua/proj.android/ant.properties | 0 .../multi-platform-lua/proj.android/build.xml | 0 .../multi-platform-lua/proj.android/build_native.py | 0 .../multi-platform-lua/proj.android/jni/Android.mk | 0 .../proj.android/jni/Application.mk | 0 .../proj.android/jni/hellolua/main.cpp | 0 .../proj.android/proguard-project.txt | 0 .../proj.android/project.properties | 0 .../proj.android/res/values/strings.xml | 0 .../src/org/cocos2dx/lua/Cocos2dxActivity.java | 0 .../proj.ios_mac/HelloLua.xcodeproj/project.pbxproj | 0 .../proj.ios_mac/ios/AppController.h | 0 .../proj.ios_mac/ios/AppController.mm | 0 .../ios/Default-568h@2x.png.REMOVED.git-id | 0 .../proj.ios_mac/ios/Default@2x.png.REMOVED.git-id | 0 .../multi-platform-lua/proj.ios_mac/ios/Prefix.pch | 0 .../proj.ios_mac/ios/RootViewController.h | 0 .../proj.ios_mac/ios/RootViewController.mm | 0 .../multi-platform-lua/proj.ios_mac/ios/main.m | 0 .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 0 .../multi-platform-lua/proj.ios_mac/mac/Prefix.pch | 0 .../multi-platform-lua/proj.ios_mac/mac/main.cpp | 0 .../multi-platform-lua/proj.linux/main.cpp | 0 .../multi-platform-lua/proj.win32/HelloLua.sln | 0 .../multi-platform-lua/proj.win32/HelloLua.vcxproj | 0 .../proj.win32/HelloLua.vcxproj.filters | 0 .../proj.win32/HelloLua.vcxproj.user | 0 .../multi-platform-lua/proj.win32/game.rc | 0 .../multi-platform-lua/proj.win32/main.cpp | 0 .../multi-platform-lua/proj.win32/main.h | 0 .../multi-platform-lua/proj.win32/res/game.ico | Bin .../multi-platform-lua/proj.win32/resource.h | 0 183 files changed, 0 insertions(+), 0 deletions(-) rename {template => templates}/multi-platform-cpp/CMakeLists.txt (100%) rename {template => templates}/multi-platform-cpp/Classes/AppDelegate.cpp (100%) rename {template => templates}/multi-platform-cpp/Classes/AppDelegate.h (100%) rename {template => templates}/multi-platform-cpp/Classes/HelloWorldScene.cpp (100%) rename {template => templates}/multi-platform-cpp/Classes/HelloWorldScene.h (100%) rename {template => templates}/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-cpp/proj.android/.classpath (100%) rename {template => templates}/multi-platform-cpp/proj.android/.project (100%) rename {template => templates}/multi-platform-cpp/proj.android/AndroidManifest.xml (100%) rename {template => templates}/multi-platform-cpp/proj.android/README.md (100%) rename {template => templates}/multi-platform-cpp/proj.android/ant.properties (100%) rename {template => templates}/multi-platform-cpp/proj.android/build.xml (100%) rename {template => templates}/multi-platform-cpp/proj.android/build_native.py (100%) rename {template => templates}/multi-platform-cpp/proj.android/jni/Android.mk (100%) rename {template => templates}/multi-platform-cpp/proj.android/jni/Application.mk (100%) rename {template => templates}/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp (100%) rename {template => templates}/multi-platform-cpp/proj.android/proguard-project.txt (100%) rename {template => templates}/multi-platform-cpp/proj.android/project.properties (100%) rename {template => templates}/multi-platform-cpp/proj.android/res/values/strings.xml (100%) rename {template => templates}/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/AppController.h (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/AppController.mm (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/ios/main.m (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch (100%) rename {template => templates}/multi-platform-cpp/proj.ios_mac/mac/main.cpp (100%) rename {template => templates}/multi-platform-cpp/proj.linux/main.cpp (100%) rename {template => templates}/multi-platform-cpp/proj.win32/HelloCpp.sln (100%) rename {template => templates}/multi-platform-cpp/proj.win32/HelloCpp.vcxproj (100%) rename {template => templates}/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters (100%) rename {template => templates}/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user (100%) rename {template => templates}/multi-platform-cpp/proj.win32/game.rc (100%) rename {template => templates}/multi-platform-cpp/proj.win32/main.cpp (100%) rename {template => templates}/multi-platform-cpp/proj.win32/main.h (100%) rename {template => templates}/multi-platform-cpp/proj.win32/res/game.ico (100%) rename {template => templates}/multi-platform-cpp/proj.win32/resource.h (100%) rename {template => templates}/multi-platform-js-runtime/cocos2d-jsb.js (100%) rename {template => templates}/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/Classes/AppDelegate.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/Classes/Runtime.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/Classes/Runtime.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/build_runtime.py (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/.classpath (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/.project (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/README.md (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/ant.properties (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/build.xml (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/build_native.py (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/custom_rules.xml (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/jni/Android.mk (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/jni/Application.mk (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/proguard-project.txt (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/project.properties (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/game.rc (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/main.cpp (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/main.h (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/res/game.ico (100%) rename {template => templates}/multi-platform-js-runtime/framework/proj.win32/resource.h (100%) rename {template => templates}/multi-platform-js-runtime/res/HelloWorld.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js-runtime/runtime/CocosPlayer/android/CocosPlayer.apk.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js-runtime/runtime/CocosPlayer/ios/ios-sim (100%) rename {template => templates}/multi-platform-js-runtime/src/app.js (100%) rename {template => templates}/multi-platform-js-runtime/src/resource.js (100%) rename {template => templates}/multi-platform-js/CMakeLists.txt (100%) rename {template => templates}/multi-platform-js/Classes/AppDelegate.cpp (100%) rename {template => templates}/multi-platform-js/Classes/AppDelegate.h (100%) rename {template => templates}/multi-platform-js/Resources/cocos2d-jsb.js (100%) rename {template => templates}/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js/Resources/src/myApp.js (100%) rename {template => templates}/multi-platform-js/Resources/src/resource.js (100%) rename {template => templates}/multi-platform-js/proj.android/.classpath (100%) rename {template => templates}/multi-platform-js/proj.android/.project (100%) rename {template => templates}/multi-platform-js/proj.android/AndroidManifest.xml (100%) rename {template => templates}/multi-platform-js/proj.android/README.md (100%) rename {template => templates}/multi-platform-js/proj.android/ant.properties (100%) rename {template => templates}/multi-platform-js/proj.android/build.xml (100%) rename {template => templates}/multi-platform-js/proj.android/build_native.py (100%) rename {template => templates}/multi-platform-js/proj.android/jni/Android.mk (100%) rename {template => templates}/multi-platform-js/proj.android/jni/Application.mk (100%) rename {template => templates}/multi-platform-js/proj.android/jni/hellojavascript/main.cpp (100%) rename {template => templates}/multi-platform-js/proj.android/proguard-project.txt (100%) rename {template => templates}/multi-platform-js/proj.android/project.properties (100%) rename {template => templates}/multi-platform-js/proj.android/res/values/strings.xml (100%) rename {template => templates}/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/AppController.h (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/AppController.mm (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/Prefix.pch (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/RootViewController.h (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/RootViewController.mm (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/ios/main.m (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/mac/Prefix.pch (100%) rename {template => templates}/multi-platform-js/proj.ios_mac/mac/main.cpp (100%) rename {template => templates}/multi-platform-js/proj.linux/main.cpp (100%) rename {template => templates}/multi-platform-js/proj.win32/HelloJavascript.sln (100%) rename {template => templates}/multi-platform-js/proj.win32/HelloJavascript.vcxproj (100%) rename {template => templates}/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters (100%) rename {template => templates}/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user (100%) rename {template => templates}/multi-platform-js/proj.win32/game.rc (100%) rename {template => templates}/multi-platform-js/proj.win32/main.cpp (100%) rename {template => templates}/multi-platform-js/proj.win32/main.h (100%) rename {template => templates}/multi-platform-js/proj.win32/res/game.ico (100%) rename {template => templates}/multi-platform-js/proj.win32/resource.h (100%) rename {template => templates}/multi-platform-lua/CMakeLists.txt (100%) rename {template => templates}/multi-platform-lua/Classes/AppDelegate.cpp (100%) rename {template => templates}/multi-platform-lua/Classes/AppDelegate.h (100%) rename {template => templates}/multi-platform-lua/Resources/background.mp3.REMOVED.git-id (100%) rename {template => templates}/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id (100%) rename {template => templates}/multi-platform-lua/Resources/hello.lua (100%) rename {template => templates}/multi-platform-lua/Resources/hello2.lua (100%) rename {template => templates}/multi-platform-lua/Resources/mobdebug.lua (100%) rename {template => templates}/multi-platform-lua/proj.android/.classpath (100%) rename {template => templates}/multi-platform-lua/proj.android/.project (100%) rename {template => templates}/multi-platform-lua/proj.android/AndroidManifest.xml (100%) rename {template => templates}/multi-platform-lua/proj.android/ant.properties (100%) rename {template => templates}/multi-platform-lua/proj.android/build.xml (100%) rename {template => templates}/multi-platform-lua/proj.android/build_native.py (100%) rename {template => templates}/multi-platform-lua/proj.android/jni/Android.mk (100%) rename {template => templates}/multi-platform-lua/proj.android/jni/Application.mk (100%) rename {template => templates}/multi-platform-lua/proj.android/jni/hellolua/main.cpp (100%) rename {template => templates}/multi-platform-lua/proj.android/proguard-project.txt (100%) rename {template => templates}/multi-platform-lua/proj.android/project.properties (100%) rename {template => templates}/multi-platform-lua/proj.android/res/values/strings.xml (100%) rename {template => templates}/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/AppController.h (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/AppController.mm (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/Prefix.pch (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/RootViewController.h (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/ios/main.m (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/mac/Prefix.pch (100%) rename {template => templates}/multi-platform-lua/proj.ios_mac/mac/main.cpp (100%) rename {template => templates}/multi-platform-lua/proj.linux/main.cpp (100%) rename {template => templates}/multi-platform-lua/proj.win32/HelloLua.sln (100%) rename {template => templates}/multi-platform-lua/proj.win32/HelloLua.vcxproj (100%) rename {template => templates}/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters (100%) rename {template => templates}/multi-platform-lua/proj.win32/HelloLua.vcxproj.user (100%) rename {template => templates}/multi-platform-lua/proj.win32/game.rc (100%) rename {template => templates}/multi-platform-lua/proj.win32/main.cpp (100%) rename {template => templates}/multi-platform-lua/proj.win32/main.h (100%) rename {template => templates}/multi-platform-lua/proj.win32/res/game.ico (100%) rename {template => templates}/multi-platform-lua/proj.win32/resource.h (100%) diff --git a/template/multi-platform-cpp/CMakeLists.txt b/templates/multi-platform-cpp/CMakeLists.txt similarity index 100% rename from template/multi-platform-cpp/CMakeLists.txt rename to templates/multi-platform-cpp/CMakeLists.txt diff --git a/template/multi-platform-cpp/Classes/AppDelegate.cpp b/templates/multi-platform-cpp/Classes/AppDelegate.cpp similarity index 100% rename from template/multi-platform-cpp/Classes/AppDelegate.cpp rename to templates/multi-platform-cpp/Classes/AppDelegate.cpp diff --git a/template/multi-platform-cpp/Classes/AppDelegate.h b/templates/multi-platform-cpp/Classes/AppDelegate.h similarity index 100% rename from template/multi-platform-cpp/Classes/AppDelegate.h rename to templates/multi-platform-cpp/Classes/AppDelegate.h diff --git a/template/multi-platform-cpp/Classes/HelloWorldScene.cpp b/templates/multi-platform-cpp/Classes/HelloWorldScene.cpp similarity index 100% rename from template/multi-platform-cpp/Classes/HelloWorldScene.cpp rename to templates/multi-platform-cpp/Classes/HelloWorldScene.cpp diff --git a/template/multi-platform-cpp/Classes/HelloWorldScene.h b/templates/multi-platform-cpp/Classes/HelloWorldScene.h similarity index 100% rename from template/multi-platform-cpp/Classes/HelloWorldScene.h rename to templates/multi-platform-cpp/Classes/HelloWorldScene.h diff --git a/template/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id b/templates/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id rename to templates/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id diff --git a/template/multi-platform-cpp/proj.android/.classpath b/templates/multi-platform-cpp/proj.android/.classpath similarity index 100% rename from template/multi-platform-cpp/proj.android/.classpath rename to templates/multi-platform-cpp/proj.android/.classpath diff --git a/template/multi-platform-cpp/proj.android/.project b/templates/multi-platform-cpp/proj.android/.project similarity index 100% rename from template/multi-platform-cpp/proj.android/.project rename to templates/multi-platform-cpp/proj.android/.project diff --git a/template/multi-platform-cpp/proj.android/AndroidManifest.xml b/templates/multi-platform-cpp/proj.android/AndroidManifest.xml similarity index 100% rename from template/multi-platform-cpp/proj.android/AndroidManifest.xml rename to templates/multi-platform-cpp/proj.android/AndroidManifest.xml diff --git a/template/multi-platform-cpp/proj.android/README.md b/templates/multi-platform-cpp/proj.android/README.md similarity index 100% rename from template/multi-platform-cpp/proj.android/README.md rename to templates/multi-platform-cpp/proj.android/README.md diff --git a/template/multi-platform-cpp/proj.android/ant.properties b/templates/multi-platform-cpp/proj.android/ant.properties similarity index 100% rename from template/multi-platform-cpp/proj.android/ant.properties rename to templates/multi-platform-cpp/proj.android/ant.properties diff --git a/template/multi-platform-cpp/proj.android/build.xml b/templates/multi-platform-cpp/proj.android/build.xml similarity index 100% rename from template/multi-platform-cpp/proj.android/build.xml rename to templates/multi-platform-cpp/proj.android/build.xml diff --git a/template/multi-platform-cpp/proj.android/build_native.py b/templates/multi-platform-cpp/proj.android/build_native.py similarity index 100% rename from template/multi-platform-cpp/proj.android/build_native.py rename to templates/multi-platform-cpp/proj.android/build_native.py diff --git a/template/multi-platform-cpp/proj.android/jni/Android.mk b/templates/multi-platform-cpp/proj.android/jni/Android.mk similarity index 100% rename from template/multi-platform-cpp/proj.android/jni/Android.mk rename to templates/multi-platform-cpp/proj.android/jni/Android.mk diff --git a/template/multi-platform-cpp/proj.android/jni/Application.mk b/templates/multi-platform-cpp/proj.android/jni/Application.mk similarity index 100% rename from template/multi-platform-cpp/proj.android/jni/Application.mk rename to templates/multi-platform-cpp/proj.android/jni/Application.mk diff --git a/template/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp b/templates/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp similarity index 100% rename from template/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp rename to templates/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp diff --git a/template/multi-platform-cpp/proj.android/proguard-project.txt b/templates/multi-platform-cpp/proj.android/proguard-project.txt similarity index 100% rename from template/multi-platform-cpp/proj.android/proguard-project.txt rename to templates/multi-platform-cpp/proj.android/proguard-project.txt diff --git a/template/multi-platform-cpp/proj.android/project.properties b/templates/multi-platform-cpp/proj.android/project.properties similarity index 100% rename from template/multi-platform-cpp/proj.android/project.properties rename to templates/multi-platform-cpp/proj.android/project.properties diff --git a/template/multi-platform-cpp/proj.android/res/values/strings.xml b/templates/multi-platform-cpp/proj.android/res/values/strings.xml similarity index 100% rename from template/multi-platform-cpp/proj.android/res/values/strings.xml rename to templates/multi-platform-cpp/proj.android/res/values/strings.xml diff --git a/template/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java b/templates/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java similarity index 100% rename from template/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java rename to templates/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java diff --git a/template/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj b/templates/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj rename to templates/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/AppController.h b/templates/multi-platform-cpp/proj.ios_mac/ios/AppController.h similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/AppController.h rename to templates/multi-platform-cpp/proj.ios_mac/ios/AppController.h diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-cpp/proj.ios_mac/ios/AppController.mm similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/AppController.mm rename to templates/multi-platform-cpp/proj.ios_mac/ios/AppController.mm diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id rename to templates/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id rename to templates/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch rename to templates/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h rename to templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm rename to templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm diff --git a/template/multi-platform-cpp/proj.ios_mac/ios/main.m b/templates/multi-platform-cpp/proj.ios_mac/ios/main.m similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/ios/main.m rename to templates/multi-platform-cpp/proj.ios_mac/ios/main.m diff --git a/template/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id rename to templates/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id diff --git a/template/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch rename to templates/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch diff --git a/template/multi-platform-cpp/proj.ios_mac/mac/main.cpp b/templates/multi-platform-cpp/proj.ios_mac/mac/main.cpp similarity index 100% rename from template/multi-platform-cpp/proj.ios_mac/mac/main.cpp rename to templates/multi-platform-cpp/proj.ios_mac/mac/main.cpp diff --git a/template/multi-platform-cpp/proj.linux/main.cpp b/templates/multi-platform-cpp/proj.linux/main.cpp similarity index 100% rename from template/multi-platform-cpp/proj.linux/main.cpp rename to templates/multi-platform-cpp/proj.linux/main.cpp diff --git a/template/multi-platform-cpp/proj.win32/HelloCpp.sln b/templates/multi-platform-cpp/proj.win32/HelloCpp.sln similarity index 100% rename from template/multi-platform-cpp/proj.win32/HelloCpp.sln rename to templates/multi-platform-cpp/proj.win32/HelloCpp.sln diff --git a/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj b/templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj similarity index 100% rename from template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj rename to templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj diff --git a/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters b/templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters similarity index 100% rename from template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters rename to templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters diff --git a/template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user b/templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user similarity index 100% rename from template/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user rename to templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user diff --git a/template/multi-platform-cpp/proj.win32/game.rc b/templates/multi-platform-cpp/proj.win32/game.rc similarity index 100% rename from template/multi-platform-cpp/proj.win32/game.rc rename to templates/multi-platform-cpp/proj.win32/game.rc diff --git a/template/multi-platform-cpp/proj.win32/main.cpp b/templates/multi-platform-cpp/proj.win32/main.cpp similarity index 100% rename from template/multi-platform-cpp/proj.win32/main.cpp rename to templates/multi-platform-cpp/proj.win32/main.cpp diff --git a/template/multi-platform-cpp/proj.win32/main.h b/templates/multi-platform-cpp/proj.win32/main.h similarity index 100% rename from template/multi-platform-cpp/proj.win32/main.h rename to templates/multi-platform-cpp/proj.win32/main.h diff --git a/template/multi-platform-cpp/proj.win32/res/game.ico b/templates/multi-platform-cpp/proj.win32/res/game.ico similarity index 100% rename from template/multi-platform-cpp/proj.win32/res/game.ico rename to templates/multi-platform-cpp/proj.win32/res/game.ico diff --git a/template/multi-platform-cpp/proj.win32/resource.h b/templates/multi-platform-cpp/proj.win32/resource.h similarity index 100% rename from template/multi-platform-cpp/proj.win32/resource.h rename to templates/multi-platform-cpp/proj.win32/resource.h diff --git a/template/multi-platform-js-runtime/cocos2d-jsb.js b/templates/multi-platform-js-runtime/cocos2d-jsb.js similarity index 100% rename from template/multi-platform-js-runtime/cocos2d-jsb.js rename to templates/multi-platform-js-runtime/cocos2d-jsb.js diff --git a/template/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp b/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp rename to templates/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp diff --git a/template/multi-platform-js-runtime/framework/Classes/AppDelegate.h b/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.h similarity index 100% rename from template/multi-platform-js-runtime/framework/Classes/AppDelegate.h rename to templates/multi-platform-js-runtime/framework/Classes/AppDelegate.h diff --git a/template/multi-platform-js-runtime/framework/Classes/Runtime.cpp b/templates/multi-platform-js-runtime/framework/Classes/Runtime.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/Classes/Runtime.cpp rename to templates/multi-platform-js-runtime/framework/Classes/Runtime.cpp diff --git a/template/multi-platform-js-runtime/framework/Classes/Runtime.h b/templates/multi-platform-js-runtime/framework/Classes/Runtime.h similarity index 100% rename from template/multi-platform-js-runtime/framework/Classes/Runtime.h rename to templates/multi-platform-js-runtime/framework/Classes/Runtime.h diff --git a/template/multi-platform-js-runtime/framework/build_runtime.py b/templates/multi-platform-js-runtime/framework/build_runtime.py similarity index 100% rename from template/multi-platform-js-runtime/framework/build_runtime.py rename to templates/multi-platform-js-runtime/framework/build_runtime.py diff --git a/template/multi-platform-js-runtime/framework/proj.android/.classpath b/templates/multi-platform-js-runtime/framework/proj.android/.classpath similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/.classpath rename to templates/multi-platform-js-runtime/framework/proj.android/.classpath diff --git a/template/multi-platform-js-runtime/framework/proj.android/.project b/templates/multi-platform-js-runtime/framework/proj.android/.project similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/.project rename to templates/multi-platform-js-runtime/framework/proj.android/.project diff --git a/template/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml b/templates/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml rename to templates/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml diff --git a/template/multi-platform-js-runtime/framework/proj.android/README.md b/templates/multi-platform-js-runtime/framework/proj.android/README.md similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/README.md rename to templates/multi-platform-js-runtime/framework/proj.android/README.md diff --git a/template/multi-platform-js-runtime/framework/proj.android/ant.properties b/templates/multi-platform-js-runtime/framework/proj.android/ant.properties similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/ant.properties rename to templates/multi-platform-js-runtime/framework/proj.android/ant.properties diff --git a/template/multi-platform-js-runtime/framework/proj.android/build.xml b/templates/multi-platform-js-runtime/framework/proj.android/build.xml similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/build.xml rename to templates/multi-platform-js-runtime/framework/proj.android/build.xml diff --git a/template/multi-platform-js-runtime/framework/proj.android/build_native.py b/templates/multi-platform-js-runtime/framework/proj.android/build_native.py similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/build_native.py rename to templates/multi-platform-js-runtime/framework/proj.android/build_native.py diff --git a/template/multi-platform-js-runtime/framework/proj.android/custom_rules.xml b/templates/multi-platform-js-runtime/framework/proj.android/custom_rules.xml similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/custom_rules.xml rename to templates/multi-platform-js-runtime/framework/proj.android/custom_rules.xml diff --git a/template/multi-platform-js-runtime/framework/proj.android/jni/Android.mk b/templates/multi-platform-js-runtime/framework/proj.android/jni/Android.mk similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/jni/Android.mk rename to templates/multi-platform-js-runtime/framework/proj.android/jni/Android.mk diff --git a/template/multi-platform-js-runtime/framework/proj.android/jni/Application.mk b/templates/multi-platform-js-runtime/framework/proj.android/jni/Application.mk similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/jni/Application.mk rename to templates/multi-platform-js-runtime/framework/proj.android/jni/Application.mk diff --git a/template/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp b/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp rename to templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp diff --git a/template/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp b/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp rename to templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp diff --git a/template/multi-platform-js-runtime/framework/proj.android/proguard-project.txt b/templates/multi-platform-js-runtime/framework/proj.android/proguard-project.txt similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/proguard-project.txt rename to templates/multi-platform-js-runtime/framework/proj.android/proguard-project.txt diff --git a/template/multi-platform-js-runtime/framework/proj.android/project.properties b/templates/multi-platform-js-runtime/framework/proj.android/project.properties similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/project.properties rename to templates/multi-platform-js-runtime/framework/proj.android/project.properties diff --git a/template/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml b/templates/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml rename to templates/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml diff --git a/template/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java b/templates/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java rename to templates/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/templates/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm diff --git a/template/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m rename to templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m diff --git a/template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln rename to templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln diff --git a/template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj rename to templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj diff --git a/template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters rename to templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters diff --git a/template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user rename to templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user diff --git a/template/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp b/templates/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp rename to templates/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp diff --git a/template/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp b/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp rename to templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp diff --git a/template/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h b/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h rename to templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h diff --git a/template/multi-platform-js-runtime/framework/proj.win32/game.rc b/templates/multi-platform-js-runtime/framework/proj.win32/game.rc similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/game.rc rename to templates/multi-platform-js-runtime/framework/proj.win32/game.rc diff --git a/template/multi-platform-js-runtime/framework/proj.win32/main.cpp b/templates/multi-platform-js-runtime/framework/proj.win32/main.cpp similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/main.cpp rename to templates/multi-platform-js-runtime/framework/proj.win32/main.cpp diff --git a/template/multi-platform-js-runtime/framework/proj.win32/main.h b/templates/multi-platform-js-runtime/framework/proj.win32/main.h similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/main.h rename to templates/multi-platform-js-runtime/framework/proj.win32/main.h diff --git a/template/multi-platform-js-runtime/framework/proj.win32/res/game.ico b/templates/multi-platform-js-runtime/framework/proj.win32/res/game.ico similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/res/game.ico rename to templates/multi-platform-js-runtime/framework/proj.win32/res/game.ico diff --git a/template/multi-platform-js-runtime/framework/proj.win32/resource.h b/templates/multi-platform-js-runtime/framework/proj.win32/resource.h similarity index 100% rename from template/multi-platform-js-runtime/framework/proj.win32/resource.h rename to templates/multi-platform-js-runtime/framework/proj.win32/resource.h diff --git a/template/multi-platform-js-runtime/res/HelloWorld.png.REMOVED.git-id b/templates/multi-platform-js-runtime/res/HelloWorld.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-js-runtime/res/HelloWorld.png.REMOVED.git-id rename to templates/multi-platform-js-runtime/res/HelloWorld.png.REMOVED.git-id diff --git a/template/multi-platform-js-runtime/runtime/CocosPlayer/android/CocosPlayer.apk.REMOVED.git-id b/templates/multi-platform-js-runtime/runtime/CocosPlayer/android/CocosPlayer.apk.REMOVED.git-id similarity index 100% rename from template/multi-platform-js-runtime/runtime/CocosPlayer/android/CocosPlayer.apk.REMOVED.git-id rename to templates/multi-platform-js-runtime/runtime/CocosPlayer/android/CocosPlayer.apk.REMOVED.git-id diff --git a/template/multi-platform-js-runtime/runtime/CocosPlayer/ios/ios-sim b/templates/multi-platform-js-runtime/runtime/CocosPlayer/ios/ios-sim similarity index 100% rename from template/multi-platform-js-runtime/runtime/CocosPlayer/ios/ios-sim rename to templates/multi-platform-js-runtime/runtime/CocosPlayer/ios/ios-sim diff --git a/template/multi-platform-js-runtime/src/app.js b/templates/multi-platform-js-runtime/src/app.js similarity index 100% rename from template/multi-platform-js-runtime/src/app.js rename to templates/multi-platform-js-runtime/src/app.js diff --git a/template/multi-platform-js-runtime/src/resource.js b/templates/multi-platform-js-runtime/src/resource.js similarity index 100% rename from template/multi-platform-js-runtime/src/resource.js rename to templates/multi-platform-js-runtime/src/resource.js diff --git a/template/multi-platform-js/CMakeLists.txt b/templates/multi-platform-js/CMakeLists.txt similarity index 100% rename from template/multi-platform-js/CMakeLists.txt rename to templates/multi-platform-js/CMakeLists.txt diff --git a/template/multi-platform-js/Classes/AppDelegate.cpp b/templates/multi-platform-js/Classes/AppDelegate.cpp similarity index 100% rename from template/multi-platform-js/Classes/AppDelegate.cpp rename to templates/multi-platform-js/Classes/AppDelegate.cpp diff --git a/template/multi-platform-js/Classes/AppDelegate.h b/templates/multi-platform-js/Classes/AppDelegate.h similarity index 100% rename from template/multi-platform-js/Classes/AppDelegate.h rename to templates/multi-platform-js/Classes/AppDelegate.h diff --git a/template/multi-platform-js/Resources/cocos2d-jsb.js b/templates/multi-platform-js/Resources/cocos2d-jsb.js similarity index 100% rename from template/multi-platform-js/Resources/cocos2d-jsb.js rename to templates/multi-platform-js/Resources/cocos2d-jsb.js diff --git a/template/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id b/templates/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id rename to templates/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id diff --git a/template/multi-platform-js/Resources/src/myApp.js b/templates/multi-platform-js/Resources/src/myApp.js similarity index 100% rename from template/multi-platform-js/Resources/src/myApp.js rename to templates/multi-platform-js/Resources/src/myApp.js diff --git a/template/multi-platform-js/Resources/src/resource.js b/templates/multi-platform-js/Resources/src/resource.js similarity index 100% rename from template/multi-platform-js/Resources/src/resource.js rename to templates/multi-platform-js/Resources/src/resource.js diff --git a/template/multi-platform-js/proj.android/.classpath b/templates/multi-platform-js/proj.android/.classpath similarity index 100% rename from template/multi-platform-js/proj.android/.classpath rename to templates/multi-platform-js/proj.android/.classpath diff --git a/template/multi-platform-js/proj.android/.project b/templates/multi-platform-js/proj.android/.project similarity index 100% rename from template/multi-platform-js/proj.android/.project rename to templates/multi-platform-js/proj.android/.project diff --git a/template/multi-platform-js/proj.android/AndroidManifest.xml b/templates/multi-platform-js/proj.android/AndroidManifest.xml similarity index 100% rename from template/multi-platform-js/proj.android/AndroidManifest.xml rename to templates/multi-platform-js/proj.android/AndroidManifest.xml diff --git a/template/multi-platform-js/proj.android/README.md b/templates/multi-platform-js/proj.android/README.md similarity index 100% rename from template/multi-platform-js/proj.android/README.md rename to templates/multi-platform-js/proj.android/README.md diff --git a/template/multi-platform-js/proj.android/ant.properties b/templates/multi-platform-js/proj.android/ant.properties similarity index 100% rename from template/multi-platform-js/proj.android/ant.properties rename to templates/multi-platform-js/proj.android/ant.properties diff --git a/template/multi-platform-js/proj.android/build.xml b/templates/multi-platform-js/proj.android/build.xml similarity index 100% rename from template/multi-platform-js/proj.android/build.xml rename to templates/multi-platform-js/proj.android/build.xml diff --git a/template/multi-platform-js/proj.android/build_native.py b/templates/multi-platform-js/proj.android/build_native.py similarity index 100% rename from template/multi-platform-js/proj.android/build_native.py rename to templates/multi-platform-js/proj.android/build_native.py diff --git a/template/multi-platform-js/proj.android/jni/Android.mk b/templates/multi-platform-js/proj.android/jni/Android.mk similarity index 100% rename from template/multi-platform-js/proj.android/jni/Android.mk rename to templates/multi-platform-js/proj.android/jni/Android.mk diff --git a/template/multi-platform-js/proj.android/jni/Application.mk b/templates/multi-platform-js/proj.android/jni/Application.mk similarity index 100% rename from template/multi-platform-js/proj.android/jni/Application.mk rename to templates/multi-platform-js/proj.android/jni/Application.mk diff --git a/template/multi-platform-js/proj.android/jni/hellojavascript/main.cpp b/templates/multi-platform-js/proj.android/jni/hellojavascript/main.cpp similarity index 100% rename from template/multi-platform-js/proj.android/jni/hellojavascript/main.cpp rename to templates/multi-platform-js/proj.android/jni/hellojavascript/main.cpp diff --git a/template/multi-platform-js/proj.android/proguard-project.txt b/templates/multi-platform-js/proj.android/proguard-project.txt similarity index 100% rename from template/multi-platform-js/proj.android/proguard-project.txt rename to templates/multi-platform-js/proj.android/proguard-project.txt diff --git a/template/multi-platform-js/proj.android/project.properties b/templates/multi-platform-js/proj.android/project.properties similarity index 100% rename from template/multi-platform-js/proj.android/project.properties rename to templates/multi-platform-js/proj.android/project.properties diff --git a/template/multi-platform-js/proj.android/res/values/strings.xml b/templates/multi-platform-js/proj.android/res/values/strings.xml similarity index 100% rename from template/multi-platform-js/proj.android/res/values/strings.xml rename to templates/multi-platform-js/proj.android/res/values/strings.xml diff --git a/template/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java b/templates/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java similarity index 100% rename from template/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java rename to templates/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java diff --git a/template/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/templates/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj similarity index 100% rename from template/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj rename to templates/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj diff --git a/template/multi-platform-js/proj.ios_mac/ios/AppController.h b/templates/multi-platform-js/proj.ios_mac/ios/AppController.h similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/AppController.h rename to templates/multi-platform-js/proj.ios_mac/ios/AppController.h diff --git a/template/multi-platform-js/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-js/proj.ios_mac/ios/AppController.mm similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/AppController.mm rename to templates/multi-platform-js/proj.ios_mac/ios/AppController.mm diff --git a/template/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id rename to templates/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id diff --git a/template/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id rename to templates/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id diff --git a/template/multi-platform-js/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-js/proj.ios_mac/ios/Prefix.pch similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/Prefix.pch rename to templates/multi-platform-js/proj.ios_mac/ios/Prefix.pch diff --git a/template/multi-platform-js/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.h similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/RootViewController.h rename to templates/multi-platform-js/proj.ios_mac/ios/RootViewController.h diff --git a/template/multi-platform-js/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.mm similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/RootViewController.mm rename to templates/multi-platform-js/proj.ios_mac/ios/RootViewController.mm diff --git a/template/multi-platform-js/proj.ios_mac/ios/main.m b/templates/multi-platform-js/proj.ios_mac/ios/main.m similarity index 100% rename from template/multi-platform-js/proj.ios_mac/ios/main.m rename to templates/multi-platform-js/proj.ios_mac/ios/main.m diff --git a/template/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id similarity index 100% rename from template/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id rename to templates/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id diff --git a/template/multi-platform-js/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-js/proj.ios_mac/mac/Prefix.pch similarity index 100% rename from template/multi-platform-js/proj.ios_mac/mac/Prefix.pch rename to templates/multi-platform-js/proj.ios_mac/mac/Prefix.pch diff --git a/template/multi-platform-js/proj.ios_mac/mac/main.cpp b/templates/multi-platform-js/proj.ios_mac/mac/main.cpp similarity index 100% rename from template/multi-platform-js/proj.ios_mac/mac/main.cpp rename to templates/multi-platform-js/proj.ios_mac/mac/main.cpp diff --git a/template/multi-platform-js/proj.linux/main.cpp b/templates/multi-platform-js/proj.linux/main.cpp similarity index 100% rename from template/multi-platform-js/proj.linux/main.cpp rename to templates/multi-platform-js/proj.linux/main.cpp diff --git a/template/multi-platform-js/proj.win32/HelloJavascript.sln b/templates/multi-platform-js/proj.win32/HelloJavascript.sln similarity index 100% rename from template/multi-platform-js/proj.win32/HelloJavascript.sln rename to templates/multi-platform-js/proj.win32/HelloJavascript.sln diff --git a/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj b/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj similarity index 100% rename from template/multi-platform-js/proj.win32/HelloJavascript.vcxproj rename to templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj diff --git a/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters b/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters similarity index 100% rename from template/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters rename to templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters diff --git a/template/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user b/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user similarity index 100% rename from template/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user rename to templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user diff --git a/template/multi-platform-js/proj.win32/game.rc b/templates/multi-platform-js/proj.win32/game.rc similarity index 100% rename from template/multi-platform-js/proj.win32/game.rc rename to templates/multi-platform-js/proj.win32/game.rc diff --git a/template/multi-platform-js/proj.win32/main.cpp b/templates/multi-platform-js/proj.win32/main.cpp similarity index 100% rename from template/multi-platform-js/proj.win32/main.cpp rename to templates/multi-platform-js/proj.win32/main.cpp diff --git a/template/multi-platform-js/proj.win32/main.h b/templates/multi-platform-js/proj.win32/main.h similarity index 100% rename from template/multi-platform-js/proj.win32/main.h rename to templates/multi-platform-js/proj.win32/main.h diff --git a/template/multi-platform-js/proj.win32/res/game.ico b/templates/multi-platform-js/proj.win32/res/game.ico similarity index 100% rename from template/multi-platform-js/proj.win32/res/game.ico rename to templates/multi-platform-js/proj.win32/res/game.ico diff --git a/template/multi-platform-js/proj.win32/resource.h b/templates/multi-platform-js/proj.win32/resource.h similarity index 100% rename from template/multi-platform-js/proj.win32/resource.h rename to templates/multi-platform-js/proj.win32/resource.h diff --git a/template/multi-platform-lua/CMakeLists.txt b/templates/multi-platform-lua/CMakeLists.txt similarity index 100% rename from template/multi-platform-lua/CMakeLists.txt rename to templates/multi-platform-lua/CMakeLists.txt diff --git a/template/multi-platform-lua/Classes/AppDelegate.cpp b/templates/multi-platform-lua/Classes/AppDelegate.cpp similarity index 100% rename from template/multi-platform-lua/Classes/AppDelegate.cpp rename to templates/multi-platform-lua/Classes/AppDelegate.cpp diff --git a/template/multi-platform-lua/Classes/AppDelegate.h b/templates/multi-platform-lua/Classes/AppDelegate.h similarity index 100% rename from template/multi-platform-lua/Classes/AppDelegate.h rename to templates/multi-platform-lua/Classes/AppDelegate.h diff --git a/template/multi-platform-lua/Resources/background.mp3.REMOVED.git-id b/templates/multi-platform-lua/Resources/background.mp3.REMOVED.git-id similarity index 100% rename from template/multi-platform-lua/Resources/background.mp3.REMOVED.git-id rename to templates/multi-platform-lua/Resources/background.mp3.REMOVED.git-id diff --git a/template/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id b/templates/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id similarity index 100% rename from template/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id rename to templates/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id diff --git a/template/multi-platform-lua/Resources/hello.lua b/templates/multi-platform-lua/Resources/hello.lua similarity index 100% rename from template/multi-platform-lua/Resources/hello.lua rename to templates/multi-platform-lua/Resources/hello.lua diff --git a/template/multi-platform-lua/Resources/hello2.lua b/templates/multi-platform-lua/Resources/hello2.lua similarity index 100% rename from template/multi-platform-lua/Resources/hello2.lua rename to templates/multi-platform-lua/Resources/hello2.lua diff --git a/template/multi-platform-lua/Resources/mobdebug.lua b/templates/multi-platform-lua/Resources/mobdebug.lua similarity index 100% rename from template/multi-platform-lua/Resources/mobdebug.lua rename to templates/multi-platform-lua/Resources/mobdebug.lua diff --git a/template/multi-platform-lua/proj.android/.classpath b/templates/multi-platform-lua/proj.android/.classpath similarity index 100% rename from template/multi-platform-lua/proj.android/.classpath rename to templates/multi-platform-lua/proj.android/.classpath diff --git a/template/multi-platform-lua/proj.android/.project b/templates/multi-platform-lua/proj.android/.project similarity index 100% rename from template/multi-platform-lua/proj.android/.project rename to templates/multi-platform-lua/proj.android/.project diff --git a/template/multi-platform-lua/proj.android/AndroidManifest.xml b/templates/multi-platform-lua/proj.android/AndroidManifest.xml similarity index 100% rename from template/multi-platform-lua/proj.android/AndroidManifest.xml rename to templates/multi-platform-lua/proj.android/AndroidManifest.xml diff --git a/template/multi-platform-lua/proj.android/ant.properties b/templates/multi-platform-lua/proj.android/ant.properties similarity index 100% rename from template/multi-platform-lua/proj.android/ant.properties rename to templates/multi-platform-lua/proj.android/ant.properties diff --git a/template/multi-platform-lua/proj.android/build.xml b/templates/multi-platform-lua/proj.android/build.xml similarity index 100% rename from template/multi-platform-lua/proj.android/build.xml rename to templates/multi-platform-lua/proj.android/build.xml diff --git a/template/multi-platform-lua/proj.android/build_native.py b/templates/multi-platform-lua/proj.android/build_native.py similarity index 100% rename from template/multi-platform-lua/proj.android/build_native.py rename to templates/multi-platform-lua/proj.android/build_native.py diff --git a/template/multi-platform-lua/proj.android/jni/Android.mk b/templates/multi-platform-lua/proj.android/jni/Android.mk similarity index 100% rename from template/multi-platform-lua/proj.android/jni/Android.mk rename to templates/multi-platform-lua/proj.android/jni/Android.mk diff --git a/template/multi-platform-lua/proj.android/jni/Application.mk b/templates/multi-platform-lua/proj.android/jni/Application.mk similarity index 100% rename from template/multi-platform-lua/proj.android/jni/Application.mk rename to templates/multi-platform-lua/proj.android/jni/Application.mk diff --git a/template/multi-platform-lua/proj.android/jni/hellolua/main.cpp b/templates/multi-platform-lua/proj.android/jni/hellolua/main.cpp similarity index 100% rename from template/multi-platform-lua/proj.android/jni/hellolua/main.cpp rename to templates/multi-platform-lua/proj.android/jni/hellolua/main.cpp diff --git a/template/multi-platform-lua/proj.android/proguard-project.txt b/templates/multi-platform-lua/proj.android/proguard-project.txt similarity index 100% rename from template/multi-platform-lua/proj.android/proguard-project.txt rename to templates/multi-platform-lua/proj.android/proguard-project.txt diff --git a/template/multi-platform-lua/proj.android/project.properties b/templates/multi-platform-lua/proj.android/project.properties similarity index 100% rename from template/multi-platform-lua/proj.android/project.properties rename to templates/multi-platform-lua/proj.android/project.properties diff --git a/template/multi-platform-lua/proj.android/res/values/strings.xml b/templates/multi-platform-lua/proj.android/res/values/strings.xml similarity index 100% rename from template/multi-platform-lua/proj.android/res/values/strings.xml rename to templates/multi-platform-lua/proj.android/res/values/strings.xml diff --git a/template/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java b/templates/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java similarity index 100% rename from template/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java rename to templates/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java diff --git a/template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj rename to templates/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj diff --git a/template/multi-platform-lua/proj.ios_mac/ios/AppController.h b/templates/multi-platform-lua/proj.ios_mac/ios/AppController.h similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/AppController.h rename to templates/multi-platform-lua/proj.ios_mac/ios/AppController.h diff --git a/template/multi-platform-lua/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-lua/proj.ios_mac/ios/AppController.mm similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/AppController.mm rename to templates/multi-platform-lua/proj.ios_mac/ios/AppController.mm diff --git a/template/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id rename to templates/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id diff --git a/template/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id rename to templates/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id diff --git a/template/multi-platform-lua/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-lua/proj.ios_mac/ios/Prefix.pch similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/Prefix.pch rename to templates/multi-platform-lua/proj.ios_mac/ios/Prefix.pch diff --git a/template/multi-platform-lua/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.h similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/RootViewController.h rename to templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.h diff --git a/template/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm rename to templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm diff --git a/template/multi-platform-lua/proj.ios_mac/ios/main.m b/templates/multi-platform-lua/proj.ios_mac/ios/main.m similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/ios/main.m rename to templates/multi-platform-lua/proj.ios_mac/ios/main.m diff --git a/template/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id rename to templates/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id diff --git a/template/multi-platform-lua/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-lua/proj.ios_mac/mac/Prefix.pch similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/mac/Prefix.pch rename to templates/multi-platform-lua/proj.ios_mac/mac/Prefix.pch diff --git a/template/multi-platform-lua/proj.ios_mac/mac/main.cpp b/templates/multi-platform-lua/proj.ios_mac/mac/main.cpp similarity index 100% rename from template/multi-platform-lua/proj.ios_mac/mac/main.cpp rename to templates/multi-platform-lua/proj.ios_mac/mac/main.cpp diff --git a/template/multi-platform-lua/proj.linux/main.cpp b/templates/multi-platform-lua/proj.linux/main.cpp similarity index 100% rename from template/multi-platform-lua/proj.linux/main.cpp rename to templates/multi-platform-lua/proj.linux/main.cpp diff --git a/template/multi-platform-lua/proj.win32/HelloLua.sln b/templates/multi-platform-lua/proj.win32/HelloLua.sln similarity index 100% rename from template/multi-platform-lua/proj.win32/HelloLua.sln rename to templates/multi-platform-lua/proj.win32/HelloLua.sln diff --git a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj b/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj similarity index 100% rename from template/multi-platform-lua/proj.win32/HelloLua.vcxproj rename to templates/multi-platform-lua/proj.win32/HelloLua.vcxproj diff --git a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters b/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters similarity index 100% rename from template/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters rename to templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters diff --git a/template/multi-platform-lua/proj.win32/HelloLua.vcxproj.user b/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.user similarity index 100% rename from template/multi-platform-lua/proj.win32/HelloLua.vcxproj.user rename to templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.user diff --git a/template/multi-platform-lua/proj.win32/game.rc b/templates/multi-platform-lua/proj.win32/game.rc similarity index 100% rename from template/multi-platform-lua/proj.win32/game.rc rename to templates/multi-platform-lua/proj.win32/game.rc diff --git a/template/multi-platform-lua/proj.win32/main.cpp b/templates/multi-platform-lua/proj.win32/main.cpp similarity index 100% rename from template/multi-platform-lua/proj.win32/main.cpp rename to templates/multi-platform-lua/proj.win32/main.cpp diff --git a/template/multi-platform-lua/proj.win32/main.h b/templates/multi-platform-lua/proj.win32/main.h similarity index 100% rename from template/multi-platform-lua/proj.win32/main.h rename to templates/multi-platform-lua/proj.win32/main.h diff --git a/template/multi-platform-lua/proj.win32/res/game.ico b/templates/multi-platform-lua/proj.win32/res/game.ico similarity index 100% rename from template/multi-platform-lua/proj.win32/res/game.ico rename to templates/multi-platform-lua/proj.win32/res/game.ico diff --git a/template/multi-platform-lua/proj.win32/resource.h b/templates/multi-platform-lua/proj.win32/resource.h similarity index 100% rename from template/multi-platform-lua/proj.win32/resource.h rename to templates/multi-platform-lua/proj.win32/resource.h From 33a5be526cfbbdafa48a27b8464a0b5e0d5a6775 Mon Sep 17 00:00:00 2001 From: James Chen Date: Tue, 4 Mar 2014 09:46:32 +0800 Subject: [PATCH 69/69] Removes unused templates. --- .../CMakeLists.txt | 0 .../Classes/AppDelegate.cpp | 0 .../Classes/AppDelegate.h | 0 .../Classes/HelloWorldScene.cpp | 0 .../Classes/HelloWorldScene.h | 0 .../Resources/HelloWorld.png.REMOVED.git-id | 0 .../proj.android/.classpath | 0 .../proj.android/.project | 0 .../proj.android/AndroidManifest.xml | 0 .../proj.android/README.md | 0 .../proj.android/ant.properties | 0 .../proj.android/build.xml | 0 .../proj.android/build_native.py | 0 .../proj.android/jni/Android.mk | 0 .../proj.android/jni/Application.mk | 0 .../proj.android/jni/hellocpp/main.cpp | 0 .../proj.android/proguard-project.txt | 0 .../proj.android/project.properties | 0 .../proj.android/res/values/strings.xml | 0 .../org/cocos2dx/cpp/Cocos2dxActivity.java | 0 .../HelloCpp.xcodeproj/project.pbxproj | 0 .../proj.ios_mac/ios/AppController.h | 0 .../proj.ios_mac/ios/AppController.mm | 0 .../ios/Default-568h@2x.png.REMOVED.git-id | 0 .../ios/Default@2x.png.REMOVED.git-id | 0 .../proj.ios_mac/ios/Prefix.pch | 0 .../proj.ios_mac/ios/RootViewController.h | 0 .../proj.ios_mac/ios/RootViewController.mm | 0 .../proj.ios_mac/ios/main.m | 0 .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 0 .../proj.ios_mac/mac/Prefix.pch | 0 .../proj.ios_mac/mac/main.cpp | 0 .../proj.linux/main.cpp | 0 .../proj.win32/HelloCpp.sln | 0 .../proj.win32/HelloCpp.vcxproj | 0 .../proj.win32/HelloCpp.vcxproj.filters | 0 .../proj.win32/HelloCpp.vcxproj.user | 0 .../proj.win32/game.rc | 0 .../proj.win32/main.cpp | 0 .../proj.win32/main.h | 0 .../proj.win32/res/game.ico | Bin .../proj.win32/resource.h | 0 .../multi-platform-js-runtime/cocos2d-jsb.js | 35 - .../framework/Classes/AppDelegate.cpp | 72 - .../framework/Classes/AppDelegate.h | 45 - .../framework/Classes/Runtime.cpp | 347 ---- .../framework/Classes/Runtime.h | 69 - .../framework/build_runtime.py | 419 ----- .../framework/proj.android/.classpath | 9 - .../framework/proj.android/.project | 65 - .../proj.android/AndroidManifest.xml | 37 - .../framework/proj.android/README.md | 87 - .../framework/proj.android/ant.properties | 1 - .../framework/proj.android/build.xml | 92 -- .../framework/proj.android/build_native.py | 200 --- .../framework/proj.android/custom_rules.xml | 12 - .../framework/proj.android/jni/Android.mk | 33 - .../framework/proj.android/jni/Application.mk | 4 - .../jni/hellojavascript/Runtime_android.cpp | 29 - .../proj.android/jni/hellojavascript/main.cpp | 16 - .../proj.android/proguard-project.txt | 20 - .../framework/proj.android/project.properties | 13 - .../proj.android/res/values/strings.xml | 4 - .../cocos2dx/javascript/Cocos2dxActivity.java | 32 - .../HelloJavascript.xcodeproj/project.pbxproj | 1137 ------------- .../framework/proj.ios_mac/Runtime_ios-mac.mm | 28 - .../proj.ios_mac/ios/AppController.h | 35 - .../proj.ios_mac/ios/AppController.mm | 146 -- .../ios/Default-568h@2x.png.REMOVED.git-id | 1 - .../ios/Default@2x.png.REMOVED.git-id | 1 - .../framework/proj.ios_mac/ios/Prefix.pch | 8 - .../proj.ios_mac/ios/RootViewController.h | 33 - .../proj.ios_mac/ios/RootViewController.mm | 105 -- .../framework/proj.ios_mac/ios/main.m | 11 - .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 1 - .../framework/proj.ios_mac/mac/MainMenu.xib | 140 -- .../framework/proj.ios_mac/mac/Prefix.pch | 7 - .../framework/proj.ios_mac/mac/SimulatorApp.h | 50 - .../proj.ios_mac/mac/SimulatorApp.mm | 271 --- .../framework/proj.ios_mac/mac/main.m | 7 - .../framework/proj.win32/HelloJavascript.sln | 110 -- .../proj.win32/HelloJavascript.vcxproj | 238 --- .../HelloJavascript.vcxproj.filters | 57 - .../proj.win32/HelloJavascript.vcxproj.user | 11 - .../framework/proj.win32/Runtime_win32.cpp | 119 -- .../framework/proj.win32/SimulatorWindow.cpp | 246 --- .../framework/proj.win32/SimulatorWindow.h | 33 - .../framework/proj.win32/game.rc | 213 --- .../framework/proj.win32/main.cpp | 59 - .../framework/proj.win32/main.h | 12 - .../framework/proj.win32/res/game.ico | Bin 47629 -> 0 bytes .../framework/proj.win32/resource.h | 36 - .../res/HelloWorld.png.REMOVED.git-id | 1 - .../android/CocosPlayer.apk.REMOVED.git-id | 1 - .../runtime/CocosPlayer/ios/ios-sim | Bin 87876 -> 0 bytes .../multi-platform-js-runtime/src/app.js | 74 - .../multi-platform-js-runtime/src/resource.js | 20 - templates/multi-platform-js/CMakeLists.txt | 177 -- .../multi-platform-js/Classes/AppDelegate.cpp | 73 - .../multi-platform-js/Classes/AppDelegate.h | 45 - .../Resources/cocos2d-jsb.js | 53 - .../res/HelloWorld.png.REMOVED.git-id | 1 - .../multi-platform-js/Resources/src/myApp.js | 99 -- .../Resources/src/resource.js | 20 - .../multi-platform-js/proj.android/.classpath | 9 - .../multi-platform-js/proj.android/.project | 65 - .../proj.android/AndroidManifest.xml | 35 - .../multi-platform-js/proj.android/README.md | 87 - .../proj.android/ant.properties | 1 - .../multi-platform-js/proj.android/build.xml | 92 -- .../proj.android/build_native.py | 170 -- .../proj.android/jni/Android.mk | 27 - .../proj.android/jni/Application.mk | 4 - .../proj.android/jni/hellojavascript/main.cpp | 16 - .../proj.android/proguard-project.txt | 20 - .../proj.android/project.properties | 13 - .../proj.android/res/values/strings.xml | 4 - .../cocos2dx/javascript/Cocos2dxActivity.java | 32 - .../HelloJavascript.xcodeproj/project.pbxproj | 1111 ------------- .../proj.ios_mac/ios/AppController.h | 34 - .../proj.ios_mac/ios/AppController.mm | 145 -- .../ios/Default-568h@2x.png.REMOVED.git-id | 1 - .../ios/Default@2x.png.REMOVED.git-id | 1 - .../proj.ios_mac/ios/Prefix.pch | 8 - .../proj.ios_mac/ios/RootViewController.h | 33 - .../proj.ios_mac/ios/RootViewController.mm | 108 -- .../multi-platform-js/proj.ios_mac/ios/main.m | 11 - .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 1 - .../proj.ios_mac/mac/Prefix.pch | 7 - .../proj.ios_mac/mac/main.cpp | 34 - .../multi-platform-js/proj.linux/main.cpp | 15 - .../proj.win32/HelloJavascript.sln | 90 - .../proj.win32/HelloJavascript.vcxproj | 218 --- .../HelloJavascript.vcxproj.filters | 36 - .../proj.win32/HelloJavascript.vcxproj.user | 11 - .../multi-platform-js/proj.win32/game.rc | 86 - .../multi-platform-js/proj.win32/main.cpp | 34 - templates/multi-platform-js/proj.win32/main.h | 12 - .../multi-platform-js/proj.win32/res/game.ico | Bin 47629 -> 0 bytes .../multi-platform-js/proj.win32/resource.h | 20 - templates/multi-platform-lua/CMakeLists.txt | 184 --- .../Classes/AppDelegate.cpp | 61 - .../multi-platform-lua/Classes/AppDelegate.h | 38 - .../Resources/background.mp3.REMOVED.git-id | 1 - .../Resources/farm.jpg.REMOVED.git-id | 1 - .../multi-platform-lua/Resources/hello.lua | 209 --- .../multi-platform-lua/Resources/hello2.lua | 3 - .../multi-platform-lua/Resources/mobdebug.lua | 1465 ----------------- .../proj.android/.classpath | 9 - .../multi-platform-lua/proj.android/.project | 33 - .../proj.android/AndroidManifest.xml | 36 - .../proj.android/ant.properties | 17 - .../multi-platform-lua/proj.android/build.xml | 83 - .../proj.android/build_native.py | 170 -- .../proj.android/jni/Android.mk | 20 - .../proj.android/jni/Application.mk | 4 - .../proj.android/jni/hellolua/main.cpp | 16 - .../proj.android/proguard-project.txt | 20 - .../proj.android/project.properties | 13 - .../proj.android/res/values/strings.xml | 4 - .../org/cocos2dx/lua/Cocos2dxActivity.java | 32 - .../HelloLua.xcodeproj/project.pbxproj | 1028 ------------ .../proj.ios_mac/ios/AppController.h | 34 - .../proj.ios_mac/ios/AppController.mm | 143 -- .../ios/Default-568h@2x.png.REMOVED.git-id | 1 - .../ios/Default@2x.png.REMOVED.git-id | 1 - .../proj.ios_mac/ios/Prefix.pch | 8 - .../proj.ios_mac/ios/RootViewController.h | 33 - .../proj.ios_mac/ios/RootViewController.mm | 108 -- .../proj.ios_mac/ios/main.m | 15 - .../proj.ios_mac/mac/Icon.icns.REMOVED.git-id | 1 - .../proj.ios_mac/mac/Prefix.pch | 7 - .../proj.ios_mac/mac/main.cpp | 34 - .../multi-platform-lua/proj.linux/main.cpp | 15 - .../proj.win32/HelloLua.sln | 93 -- .../proj.win32/HelloLua.vcxproj | 212 --- .../proj.win32/HelloLua.vcxproj.filters | 35 - .../proj.win32/HelloLua.vcxproj.user | 10 - .../multi-platform-lua/proj.win32/game.rc | 86 - .../multi-platform-lua/proj.win32/main.cpp | 34 - .../multi-platform-lua/proj.win32/main.h | 10 - .../proj.win32/res/game.ico | Bin 47629 -> 0 bytes .../multi-platform-lua/proj.win32/resource.h | 20 - 183 files changed, 12258 deletions(-) rename templates/{multi-platform-cpp => cpp-template-default}/CMakeLists.txt (100%) rename templates/{multi-platform-cpp => cpp-template-default}/Classes/AppDelegate.cpp (100%) rename templates/{multi-platform-cpp => cpp-template-default}/Classes/AppDelegate.h (100%) rename templates/{multi-platform-cpp => cpp-template-default}/Classes/HelloWorldScene.cpp (100%) rename templates/{multi-platform-cpp => cpp-template-default}/Classes/HelloWorldScene.h (100%) rename templates/{multi-platform-cpp => cpp-template-default}/Resources/HelloWorld.png.REMOVED.git-id (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/.classpath (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/.project (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/AndroidManifest.xml (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/README.md (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/ant.properties (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/build.xml (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/build_native.py (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/jni/Android.mk (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/jni/Application.mk (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/jni/hellocpp/main.cpp (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/proguard-project.txt (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/project.properties (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/res/values/strings.xml (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/AppController.h (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/AppController.mm (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/Prefix.pch (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/RootViewController.h (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/RootViewController.mm (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/ios/main.m (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/mac/Icon.icns.REMOVED.git-id (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/mac/Prefix.pch (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.ios_mac/mac/main.cpp (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.linux/main.cpp (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/HelloCpp.sln (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/HelloCpp.vcxproj (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/HelloCpp.vcxproj.filters (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/HelloCpp.vcxproj.user (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/game.rc (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/main.cpp (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/main.h (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/res/game.ico (100%) rename templates/{multi-platform-cpp => cpp-template-default}/proj.win32/resource.h (100%) delete mode 100644 templates/multi-platform-js-runtime/cocos2d-jsb.js delete mode 100644 templates/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/Classes/AppDelegate.h delete mode 100644 templates/multi-platform-js-runtime/framework/Classes/Runtime.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/Classes/Runtime.h delete mode 100644 templates/multi-platform-js-runtime/framework/build_runtime.py delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/.classpath delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/.project delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/README.md delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/ant.properties delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/build.xml delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/build_native.py delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/custom_rules.xml delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/jni/Android.mk delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/jni/Application.mk delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/proguard-project.txt delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/project.properties delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml delete mode 100644 templates/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm delete mode 100644 templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/game.rc delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/main.cpp delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/main.h delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/res/game.ico delete mode 100644 templates/multi-platform-js-runtime/framework/proj.win32/resource.h delete mode 100644 templates/multi-platform-js-runtime/res/HelloWorld.png.REMOVED.git-id delete mode 100644 templates/multi-platform-js-runtime/runtime/CocosPlayer/android/CocosPlayer.apk.REMOVED.git-id delete mode 100644 templates/multi-platform-js-runtime/runtime/CocosPlayer/ios/ios-sim delete mode 100644 templates/multi-platform-js-runtime/src/app.js delete mode 100644 templates/multi-platform-js-runtime/src/resource.js delete mode 100644 templates/multi-platform-js/CMakeLists.txt delete mode 100644 templates/multi-platform-js/Classes/AppDelegate.cpp delete mode 100644 templates/multi-platform-js/Classes/AppDelegate.h delete mode 100644 templates/multi-platform-js/Resources/cocos2d-jsb.js delete mode 100644 templates/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id delete mode 100644 templates/multi-platform-js/Resources/src/myApp.js delete mode 100644 templates/multi-platform-js/Resources/src/resource.js delete mode 100644 templates/multi-platform-js/proj.android/.classpath delete mode 100644 templates/multi-platform-js/proj.android/.project delete mode 100644 templates/multi-platform-js/proj.android/AndroidManifest.xml delete mode 100644 templates/multi-platform-js/proj.android/README.md delete mode 100644 templates/multi-platform-js/proj.android/ant.properties delete mode 100644 templates/multi-platform-js/proj.android/build.xml delete mode 100755 templates/multi-platform-js/proj.android/build_native.py delete mode 100644 templates/multi-platform-js/proj.android/jni/Android.mk delete mode 100644 templates/multi-platform-js/proj.android/jni/Application.mk delete mode 100644 templates/multi-platform-js/proj.android/jni/hellojavascript/main.cpp delete mode 100644 templates/multi-platform-js/proj.android/proguard-project.txt delete mode 100644 templates/multi-platform-js/proj.android/project.properties delete mode 100644 templates/multi-platform-js/proj.android/res/values/strings.xml delete mode 100644 templates/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java delete mode 100644 templates/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/AppController.h delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/AppController.mm delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/Prefix.pch delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/RootViewController.h delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/RootViewController.mm delete mode 100644 templates/multi-platform-js/proj.ios_mac/ios/main.m delete mode 100644 templates/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id delete mode 100644 templates/multi-platform-js/proj.ios_mac/mac/Prefix.pch delete mode 100644 templates/multi-platform-js/proj.ios_mac/mac/main.cpp delete mode 100644 templates/multi-platform-js/proj.linux/main.cpp delete mode 100644 templates/multi-platform-js/proj.win32/HelloJavascript.sln delete mode 100644 templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj delete mode 100644 templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters delete mode 100644 templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user delete mode 100644 templates/multi-platform-js/proj.win32/game.rc delete mode 100644 templates/multi-platform-js/proj.win32/main.cpp delete mode 100644 templates/multi-platform-js/proj.win32/main.h delete mode 100644 templates/multi-platform-js/proj.win32/res/game.ico delete mode 100644 templates/multi-platform-js/proj.win32/resource.h delete mode 100644 templates/multi-platform-lua/CMakeLists.txt delete mode 100644 templates/multi-platform-lua/Classes/AppDelegate.cpp delete mode 100644 templates/multi-platform-lua/Classes/AppDelegate.h delete mode 100644 templates/multi-platform-lua/Resources/background.mp3.REMOVED.git-id delete mode 100644 templates/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id delete mode 100644 templates/multi-platform-lua/Resources/hello.lua delete mode 100644 templates/multi-platform-lua/Resources/hello2.lua delete mode 100644 templates/multi-platform-lua/Resources/mobdebug.lua delete mode 100644 templates/multi-platform-lua/proj.android/.classpath delete mode 100644 templates/multi-platform-lua/proj.android/.project delete mode 100644 templates/multi-platform-lua/proj.android/AndroidManifest.xml delete mode 100644 templates/multi-platform-lua/proj.android/ant.properties delete mode 100644 templates/multi-platform-lua/proj.android/build.xml delete mode 100755 templates/multi-platform-lua/proj.android/build_native.py delete mode 100644 templates/multi-platform-lua/proj.android/jni/Android.mk delete mode 100644 templates/multi-platform-lua/proj.android/jni/Application.mk delete mode 100644 templates/multi-platform-lua/proj.android/jni/hellolua/main.cpp delete mode 100644 templates/multi-platform-lua/proj.android/proguard-project.txt delete mode 100644 templates/multi-platform-lua/proj.android/project.properties delete mode 100644 templates/multi-platform-lua/proj.android/res/values/strings.xml delete mode 100644 templates/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java delete mode 100644 templates/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/AppController.h delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/AppController.mm delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/Prefix.pch delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.h delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm delete mode 100644 templates/multi-platform-lua/proj.ios_mac/ios/main.m delete mode 100644 templates/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id delete mode 100644 templates/multi-platform-lua/proj.ios_mac/mac/Prefix.pch delete mode 100644 templates/multi-platform-lua/proj.ios_mac/mac/main.cpp delete mode 100644 templates/multi-platform-lua/proj.linux/main.cpp delete mode 100644 templates/multi-platform-lua/proj.win32/HelloLua.sln delete mode 100644 templates/multi-platform-lua/proj.win32/HelloLua.vcxproj delete mode 100644 templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters delete mode 100644 templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.user delete mode 100644 templates/multi-platform-lua/proj.win32/game.rc delete mode 100644 templates/multi-platform-lua/proj.win32/main.cpp delete mode 100644 templates/multi-platform-lua/proj.win32/main.h delete mode 100644 templates/multi-platform-lua/proj.win32/res/game.ico delete mode 100644 templates/multi-platform-lua/proj.win32/resource.h diff --git a/templates/multi-platform-cpp/CMakeLists.txt b/templates/cpp-template-default/CMakeLists.txt similarity index 100% rename from templates/multi-platform-cpp/CMakeLists.txt rename to templates/cpp-template-default/CMakeLists.txt diff --git a/templates/multi-platform-cpp/Classes/AppDelegate.cpp b/templates/cpp-template-default/Classes/AppDelegate.cpp similarity index 100% rename from templates/multi-platform-cpp/Classes/AppDelegate.cpp rename to templates/cpp-template-default/Classes/AppDelegate.cpp diff --git a/templates/multi-platform-cpp/Classes/AppDelegate.h b/templates/cpp-template-default/Classes/AppDelegate.h similarity index 100% rename from templates/multi-platform-cpp/Classes/AppDelegate.h rename to templates/cpp-template-default/Classes/AppDelegate.h diff --git a/templates/multi-platform-cpp/Classes/HelloWorldScene.cpp b/templates/cpp-template-default/Classes/HelloWorldScene.cpp similarity index 100% rename from templates/multi-platform-cpp/Classes/HelloWorldScene.cpp rename to templates/cpp-template-default/Classes/HelloWorldScene.cpp diff --git a/templates/multi-platform-cpp/Classes/HelloWorldScene.h b/templates/cpp-template-default/Classes/HelloWorldScene.h similarity index 100% rename from templates/multi-platform-cpp/Classes/HelloWorldScene.h rename to templates/cpp-template-default/Classes/HelloWorldScene.h diff --git a/templates/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id b/templates/cpp-template-default/Resources/HelloWorld.png.REMOVED.git-id similarity index 100% rename from templates/multi-platform-cpp/Resources/HelloWorld.png.REMOVED.git-id rename to templates/cpp-template-default/Resources/HelloWorld.png.REMOVED.git-id diff --git a/templates/multi-platform-cpp/proj.android/.classpath b/templates/cpp-template-default/proj.android/.classpath similarity index 100% rename from templates/multi-platform-cpp/proj.android/.classpath rename to templates/cpp-template-default/proj.android/.classpath diff --git a/templates/multi-platform-cpp/proj.android/.project b/templates/cpp-template-default/proj.android/.project similarity index 100% rename from templates/multi-platform-cpp/proj.android/.project rename to templates/cpp-template-default/proj.android/.project diff --git a/templates/multi-platform-cpp/proj.android/AndroidManifest.xml b/templates/cpp-template-default/proj.android/AndroidManifest.xml similarity index 100% rename from templates/multi-platform-cpp/proj.android/AndroidManifest.xml rename to templates/cpp-template-default/proj.android/AndroidManifest.xml diff --git a/templates/multi-platform-cpp/proj.android/README.md b/templates/cpp-template-default/proj.android/README.md similarity index 100% rename from templates/multi-platform-cpp/proj.android/README.md rename to templates/cpp-template-default/proj.android/README.md diff --git a/templates/multi-platform-cpp/proj.android/ant.properties b/templates/cpp-template-default/proj.android/ant.properties similarity index 100% rename from templates/multi-platform-cpp/proj.android/ant.properties rename to templates/cpp-template-default/proj.android/ant.properties diff --git a/templates/multi-platform-cpp/proj.android/build.xml b/templates/cpp-template-default/proj.android/build.xml similarity index 100% rename from templates/multi-platform-cpp/proj.android/build.xml rename to templates/cpp-template-default/proj.android/build.xml diff --git a/templates/multi-platform-cpp/proj.android/build_native.py b/templates/cpp-template-default/proj.android/build_native.py similarity index 100% rename from templates/multi-platform-cpp/proj.android/build_native.py rename to templates/cpp-template-default/proj.android/build_native.py diff --git a/templates/multi-platform-cpp/proj.android/jni/Android.mk b/templates/cpp-template-default/proj.android/jni/Android.mk similarity index 100% rename from templates/multi-platform-cpp/proj.android/jni/Android.mk rename to templates/cpp-template-default/proj.android/jni/Android.mk diff --git a/templates/multi-platform-cpp/proj.android/jni/Application.mk b/templates/cpp-template-default/proj.android/jni/Application.mk similarity index 100% rename from templates/multi-platform-cpp/proj.android/jni/Application.mk rename to templates/cpp-template-default/proj.android/jni/Application.mk diff --git a/templates/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp b/templates/cpp-template-default/proj.android/jni/hellocpp/main.cpp similarity index 100% rename from templates/multi-platform-cpp/proj.android/jni/hellocpp/main.cpp rename to templates/cpp-template-default/proj.android/jni/hellocpp/main.cpp diff --git a/templates/multi-platform-cpp/proj.android/proguard-project.txt b/templates/cpp-template-default/proj.android/proguard-project.txt similarity index 100% rename from templates/multi-platform-cpp/proj.android/proguard-project.txt rename to templates/cpp-template-default/proj.android/proguard-project.txt diff --git a/templates/multi-platform-cpp/proj.android/project.properties b/templates/cpp-template-default/proj.android/project.properties similarity index 100% rename from templates/multi-platform-cpp/proj.android/project.properties rename to templates/cpp-template-default/proj.android/project.properties diff --git a/templates/multi-platform-cpp/proj.android/res/values/strings.xml b/templates/cpp-template-default/proj.android/res/values/strings.xml similarity index 100% rename from templates/multi-platform-cpp/proj.android/res/values/strings.xml rename to templates/cpp-template-default/proj.android/res/values/strings.xml diff --git a/templates/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java b/templates/cpp-template-default/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java similarity index 100% rename from templates/multi-platform-cpp/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java rename to templates/cpp-template-default/proj.android/src/org/cocos2dx/cpp/Cocos2dxActivity.java diff --git a/templates/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj b/templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj rename to templates/cpp-template-default/proj.ios_mac/HelloCpp.xcodeproj/project.pbxproj diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/AppController.h b/templates/cpp-template-default/proj.ios_mac/ios/AppController.h similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/AppController.h rename to templates/cpp-template-default/proj.ios_mac/ios/AppController.h diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/AppController.mm b/templates/cpp-template-default/proj.ios_mac/ios/AppController.mm similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/AppController.mm rename to templates/cpp-template-default/proj.ios_mac/ios/AppController.mm diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/cpp-template-default/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id rename to templates/cpp-template-default/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/cpp-template-default/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id rename to templates/cpp-template-default/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch b/templates/cpp-template-default/proj.ios_mac/ios/Prefix.pch similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/Prefix.pch rename to templates/cpp-template-default/proj.ios_mac/ios/Prefix.pch diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h b/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.h similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.h rename to templates/cpp-template-default/proj.ios_mac/ios/RootViewController.h diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm b/templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/RootViewController.mm rename to templates/cpp-template-default/proj.ios_mac/ios/RootViewController.mm diff --git a/templates/multi-platform-cpp/proj.ios_mac/ios/main.m b/templates/cpp-template-default/proj.ios_mac/ios/main.m similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/ios/main.m rename to templates/cpp-template-default/proj.ios_mac/ios/main.m diff --git a/templates/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/cpp-template-default/proj.ios_mac/mac/Icon.icns.REMOVED.git-id similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/mac/Icon.icns.REMOVED.git-id rename to templates/cpp-template-default/proj.ios_mac/mac/Icon.icns.REMOVED.git-id diff --git a/templates/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch b/templates/cpp-template-default/proj.ios_mac/mac/Prefix.pch similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/mac/Prefix.pch rename to templates/cpp-template-default/proj.ios_mac/mac/Prefix.pch diff --git a/templates/multi-platform-cpp/proj.ios_mac/mac/main.cpp b/templates/cpp-template-default/proj.ios_mac/mac/main.cpp similarity index 100% rename from templates/multi-platform-cpp/proj.ios_mac/mac/main.cpp rename to templates/cpp-template-default/proj.ios_mac/mac/main.cpp diff --git a/templates/multi-platform-cpp/proj.linux/main.cpp b/templates/cpp-template-default/proj.linux/main.cpp similarity index 100% rename from templates/multi-platform-cpp/proj.linux/main.cpp rename to templates/cpp-template-default/proj.linux/main.cpp diff --git a/templates/multi-platform-cpp/proj.win32/HelloCpp.sln b/templates/cpp-template-default/proj.win32/HelloCpp.sln similarity index 100% rename from templates/multi-platform-cpp/proj.win32/HelloCpp.sln rename to templates/cpp-template-default/proj.win32/HelloCpp.sln diff --git a/templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj similarity index 100% rename from templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj rename to templates/cpp-template-default/proj.win32/HelloCpp.vcxproj diff --git a/templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj.filters similarity index 100% rename from templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.filters rename to templates/cpp-template-default/proj.win32/HelloCpp.vcxproj.filters diff --git a/templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user b/templates/cpp-template-default/proj.win32/HelloCpp.vcxproj.user similarity index 100% rename from templates/multi-platform-cpp/proj.win32/HelloCpp.vcxproj.user rename to templates/cpp-template-default/proj.win32/HelloCpp.vcxproj.user diff --git a/templates/multi-platform-cpp/proj.win32/game.rc b/templates/cpp-template-default/proj.win32/game.rc similarity index 100% rename from templates/multi-platform-cpp/proj.win32/game.rc rename to templates/cpp-template-default/proj.win32/game.rc diff --git a/templates/multi-platform-cpp/proj.win32/main.cpp b/templates/cpp-template-default/proj.win32/main.cpp similarity index 100% rename from templates/multi-platform-cpp/proj.win32/main.cpp rename to templates/cpp-template-default/proj.win32/main.cpp diff --git a/templates/multi-platform-cpp/proj.win32/main.h b/templates/cpp-template-default/proj.win32/main.h similarity index 100% rename from templates/multi-platform-cpp/proj.win32/main.h rename to templates/cpp-template-default/proj.win32/main.h diff --git a/templates/multi-platform-cpp/proj.win32/res/game.ico b/templates/cpp-template-default/proj.win32/res/game.ico similarity index 100% rename from templates/multi-platform-cpp/proj.win32/res/game.ico rename to templates/cpp-template-default/proj.win32/res/game.ico diff --git a/templates/multi-platform-cpp/proj.win32/resource.h b/templates/cpp-template-default/proj.win32/resource.h similarity index 100% rename from templates/multi-platform-cpp/proj.win32/resource.h rename to templates/cpp-template-default/proj.win32/resource.h diff --git a/templates/multi-platform-js-runtime/cocos2d-jsb.js b/templates/multi-platform-js-runtime/cocos2d-jsb.js deleted file mode 100644 index a5f7cb7c62..0000000000 --- a/templates/multi-platform-js-runtime/cocos2d-jsb.js +++ /dev/null @@ -1,35 +0,0 @@ - -// boot code needed for cocos2d + JS bindings. -// Not needed by cocos2d-html5 - -require("jsb.js"); - -var appFiles = [ - 'src/resource.js', - 'src/app.js' -]; - -cc.dumpConfig(); - -for( var i=0; i < appFiles.length; i++) { - require( appFiles[i] ); -} - -var director = cc.Director.getInstance(); -director.setDisplayStats(true); - -// set FPS. the default value is 1.0/60 if you don't call this -director.setAnimationInterval(1.0 / 60); - -// create a scene. it's an autorelease object -var myScene = new MyScene(); - -// run -if (director.getRunningScene()) -{ - director.replaceScene(myScene); -} -else -{ - director.runWithScene(myScene); -} diff --git a/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp b/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp deleted file mode 100644 index 5d1d7d7350..0000000000 --- a/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.cpp +++ /dev/null @@ -1,72 +0,0 @@ -#include "AppDelegate.h" - -#include "cocosbuilder/js_bindings_ccbreader.h" -#include "SimpleAudioEngine.h" -#include "jsb_cocos2dx_auto.hpp" -#include "jsb_cocos2dx_extension_auto.hpp" -#include "jsb_cocos2dx_builder_auto.hpp" -#include "extension/jsb_cocos2dx_extension_manual.h" -#include "localstorage/js_bindings_system_registration.h" -#include "chipmunk/js_bindings_chipmunk_registration.h" -#include "jsb_opengl_registration.h" -#include "Runtime.h" - -USING_NS_CC; -using namespace CocosDenshion; - -AppDelegate::AppDelegate() -{ -} - -AppDelegate::~AppDelegate() -{ - ScriptEngineManager::destroyInstance(); -} - -bool AppDelegate::applicationDidFinishLaunching() -{ - // initialize director - auto director = Director::getInstance(); - auto glview = director->getOpenGLView(); - if(!glview) { - glview = GLView::createWithRect("Test Lua", Rect(0,0,900,640)); - director->setOpenGLView(glview); - } - - // turn on display FPS - director->setDisplayStats(true); - auto designSize = Size(480, 320); - glview->setDesignResolutionSize(designSize.width, designSize.height, ResolutionPolicy::EXACT_FIT); - // set FPS. the default value is 1.0/60 if you don't call this - director->setAnimationInterval(1.0 / 60); - - ScriptingCore* sc = ScriptingCore::getInstance(); - sc->addRegisterCallback(register_all_cocos2dx); - sc->addRegisterCallback(register_all_cocos2dx_extension); - sc->addRegisterCallback(register_cocos2dx_js_extensions); - sc->addRegisterCallback(register_all_cocos2dx_extension_manual); - sc->addRegisterCallback(register_all_cocos2dx_builder); - sc->addRegisterCallback(register_CCBuilderReader); - sc->addRegisterCallback(jsb_register_system); - sc->addRegisterCallback(JSB_register_opengl); - sc->addRegisterCallback(jsb_register_chipmunk); - - startRuntime(); - return true; -} - -// This function will be called when the app is inactive. When comes a phone call,it's be invoked too -void AppDelegate::applicationDidEnterBackground() -{ - Director::getInstance()->stopAnimation(); - SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); - SimpleAudioEngine::getInstance()->pauseAllEffects(); -} - -// this function will be called when the app is active again -void AppDelegate::applicationWillEnterForeground() -{ - Director::getInstance()->startAnimation(); - SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); - SimpleAudioEngine::getInstance()->resumeAllEffects(); -} diff --git a/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.h b/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.h deleted file mode 100644 index df8f12f70f..0000000000 --- a/templates/multi-platform-js-runtime/framework/Classes/AppDelegate.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// GCTestAppDelegate.h -// GCTest -// -// Created by Rohan Kuruvilla on 06/08/2012. -// Copyright __MyCompanyName__ 2012. All rights reserved. -// - -#ifndef _APP_DELEGATE_H_ -#define _APP_DELEGATE_H_ - -#include "CCApplication.h" -/** - @brief The cocos2d Application. - - The reason for implement as private inheritance is to hide some interface call by Director. - */ -class AppDelegate : private cocos2d::Application -{ -public: - AppDelegate(); - virtual ~AppDelegate(); - - /** - @brief Implement Director and Scene init code here. - @return true Initialize success, app continue. - @return false Initialize failed, app terminate. - */ - virtual bool applicationDidFinishLaunching(); - - /** - @brief The function be called when the application enter background - @param the pointer of the application - */ - virtual void applicationDidEnterBackground(); - - /** - @brief The function be called when the application enter foreground - @param the pointer of the application - */ - virtual void applicationWillEnterForeground(); -}; - -#endif // _APP_DELEGATE_H_ - diff --git a/templates/multi-platform-js-runtime/framework/Classes/Runtime.cpp b/templates/multi-platform-js-runtime/framework/Classes/Runtime.cpp deleted file mode 100644 index 0bc4b5e553..0000000000 --- a/templates/multi-platform-js-runtime/framework/Classes/Runtime.cpp +++ /dev/null @@ -1,347 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "Runtime.h" - -#include "SimpleAudioEngine.h" -#include "jsb_cocos2dx_auto.hpp" -#include "jsb_cocos2dx_extension_auto.hpp" -#include "jsb_cocos2dx_builder_auto.hpp" -#include "extension/jsb_cocos2dx_extension_manual.h" -#include "cocosbuilder/js_bindings_ccbreader.h" -#include "localstorage/js_bindings_system_registration.h" -#include "chipmunk/js_bindings_chipmunk_registration.h" -#include "jsb_opengl_registration.h" -#include "CCScheduler.h" - -#ifdef _WIN32 -#define realpath(dir,fuldir) _fullpath(fuldir,dir,_MAX_PATH_) -#else -#include -#include -#include -#include -#include -#include -#endif - -#include -#include - -using namespace std; -using namespace cocos2d; - -extern string getDotWaitFilePath(); -extern string getProjSearchPath(); -extern vector getSearchPath(); -extern bool browseDir(const char *dir,const char *filespec,vector &filterArray,vector &fileList); - -/*@brief use "|" splite string */ -vector splitFilter(const char *str) -{ - vector filterArray; - if (str) - { - char *token=NULL; - char szFilterFile[_MAX_PATH_]={0}; - strcpy(szFilterFile,str); - token = strtok(szFilterFile, "|" ); - while( token != NULL ) - { - filterArray.push_back(token); - token = strtok( NULL, "|"); - } - } - return filterArray; -} - -/*@brief wildcard funciton*/ -bool wildcardMatches(const char *wildcard, const char *str) -{ - while (1) { - if (*wildcard == '\0') - { - return *str == '\0'; - } - if (*wildcard == '?') - { - ++wildcard; ++str; - } - else if (*wildcard == '*') - { - for (++wildcard; *str; ++str) - { - if (wildcardMatches(wildcard, str)) - { - return true; - } - } - return *wildcard == '\0'; - } - else - { - if (*wildcard != *str) - { - return false; - } - ++wildcard; ++str; - } - } -} - - -#ifndef _WIN32 -/* -*@brief iterator directory and process file. -*/ -bool browseDir(const char *dir,const char *filespec,vector &filterArray,vector &fileList) -{ - DIR *dp=NULL; - struct dirent *entry=NULL; - struct stat statbuf; - if((dp = opendir(dir)) == NULL) - { - return false; - } - - if (chdir(dir) != 0) - { - return false; - } - - while((entry = readdir(dp)) != NULL) - { - lstat(entry->d_name,&statbuf); - if(S_ISDIR(statbuf.st_mode)) - { - if(strcmp(".",entry->d_name) == 0 ||strcmp("..",entry->d_name) == 0) - { - continue; - } - - if (find(filterArray.begin(),filterArray.end(),entry->d_name) != filterArray.end()) - { - continue; - } - - char subdir[_MAX_PATH_]={0}; - sprintf(subdir,"%s%s/",dir,entry->d_name); - if (!browseDir(subdir,filespec,filterArray,fileList)) - { - closedir(dp); - return false; - } - } - else - { - - if (!wildcardMatches(filespec,entry->d_name)) - { - continue; - } - - char *pszexten=strrchr(entry->d_name,'.'); - char szextension[_MAX_PATH_]={0}; - if (pszexten) - { - strcpy(szextension,"*"); - strcat(szextension,pszexten); - if (find(filterArray.begin(),filterArray.end(),szextension) != filterArray.end()) - { - continue; - } - } - - strcpy(szextension,entry->d_name); - if (find(filterArray.begin(),filterArray.end(),szextension) != filterArray.end()) - { - continue; - } - - char fullFileName[_MAX_PATH_] ={0}; - sprintf(fullFileName,"%s%s",dir,entry->d_name); - fileList.push_back(fullFileName); - } - } - chdir(".."); - closedir(dp); - return true; -} -#endif - - -/************************ -* Get file list from specified directory. -* -*@param dir search directory -*@param filespec search specified type file -*@param filterfile filter file or folder -* -*Like this: -* searchFileList("/home","*.*",".svn|.jpg|"); -*********************************/ -vector searchFileList(string &dir,const char *filespec="*.*",const char *filterfile=NULL) -{ - char fulldir[_MAX_PATH_]={0}; - vector _filterArray; - vector _lfileList; - _filterArray = splitFilter(filterfile); - - if (realpath(dir.c_str(), fulldir)== NULL) - { - return _lfileList; - } - - int len=strlen(fulldir); - if (fulldir[len-1] != '/') - { - strcat(fulldir,"/"); - } - - browseDir(fulldir,filespec,_filterArray,_lfileList); - dir =fulldir; - return _lfileList; -} - -void startScript() -{ - ScriptEngineProtocol *engine = ScriptingCore::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - ScriptingCore::getInstance()->runScript("cocos2d-jsb.js"); -} - -void reloadScript() -{ - -} - -class ConnectWaiter: public Ref -{ -public: - static ConnectWaiter& getInstance() - { - static ConnectWaiter instance; - return instance; - } - void updateConnect(float delta) - { - FileUtils::getInstance()->purgeCachedEntries(); - if (!FileUtils::getInstance()->isFileExist(_dotwaitFile)) - { - _scheduler->unscheduleSelector(SEL_SCHEDULE(&ConnectWaiter::updateConnect),this); - startScript(); - } - } - void waitDebugConnect(void) - { - _dotwaitFile = getDotWaitFilePath(); - _jsSearchPath = getProjSearchPath(); - vector fileInfoList = searchFileList(_jsSearchPath,"*.js","runtime|framework|"); - for (unsigned i = 0; i < fileInfoList.size(); i++) - { - ScriptingCore::getInstance()->compileScript(fileInfoList[i].substr(_jsSearchPath.length(),-1).c_str()); - } - - if (!FileUtils::getInstance()->isFileExist(_dotwaitFile)) - { - startScript(); - return; - } - - if (_scheduler) - { - _scheduler->scheduleSelector(SEL_SCHEDULE(&ConnectWaiter::updateConnect), this,0.5f, false); - } - } -private: - ConnectWaiter() - { - _scheduler = CCDirector::sharedDirector()->getScheduler(); - } - - cocos2d::Scheduler *_scheduler; - string _dotwaitFile; - string _jsSearchPath; -}; - -void startRuntime() -{ - vector searchPathArray; - searchPathArray = getSearchPath(); - for (unsigned i = 0; i < searchPathArray.size(); i++) - { - FileUtils::getInstance()->addSearchPath(searchPathArray[i]); - } -#ifdef COCOS2D_DEBUG - ScriptingCore::getInstance()->start(); - ScriptingCore::getInstance()->enableDebugger(); - ScriptEngineProtocol *engine = ScriptingCore::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - ScriptingCore::getInstance()->runScript("jsb.js"); - ConnectWaiter::getInstance().waitDebugConnect(); -#else - ScriptingCore::getInstance()->start(); - startScript(); -#endif -} - - - - -// SimulatorConfig -SimulatorConfig *SimulatorConfig::s_sharedInstance = NULL; -SimulatorConfig *SimulatorConfig::getInstance(void) -{ - if (!s_sharedInstance) - { - s_sharedInstance = new SimulatorConfig(); - } - return s_sharedInstance; -} - -SimulatorConfig::SimulatorConfig(void) -{ - m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 3Gs (480x320)", 480, 320)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 4 (960x640)", 960, 640)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPhone 5 (1136x640)", 1136, 640)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPad (1024x768)", 1024, 768)); - m_screenSizeArray.push_back(SimulatorScreenSize("iPad Retina (2048x1536)", 2048, 1536)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (800x480)", 800, 480)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (854x480)", 854, 480)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (960x540)", 960, 540)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1024x600)", 1024, 600)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1280x720)", 1280, 720)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1280x800)", 1280, 800)); - m_screenSizeArray.push_back(SimulatorScreenSize("Android (1920x1080)", 1920, 1080)); -} - -int SimulatorConfig::getScreenSizeCount(void) -{ - return (int)m_screenSizeArray.size(); -} - -const SimulatorScreenSize SimulatorConfig::getScreenSize(int index) -{ - return m_screenSizeArray.at(index); -} \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/Classes/Runtime.h b/templates/multi-platform-js-runtime/framework/Classes/Runtime.h deleted file mode 100644 index 5cfb0a38e4..0000000000 --- a/templates/multi-platform-js-runtime/framework/Classes/Runtime.h +++ /dev/null @@ -1,69 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef _RUNTIME__H_ -#define _RUNTIME__H_ - -#include -#include -using namespace std; - -#define _MAX_PATH_ 512 - -void startRuntime(); - -void reloadScript(); - -// SimulatorConfig -typedef struct _SimulatorScreenSize { - string title; - int width; - int height; - - _SimulatorScreenSize(const string title_, int width_, int height_) - { - title = title_; - width = width_; - height = height_; - } -} SimulatorScreenSize; - -typedef vector ScreenSizeArray; -class SimulatorConfig -{ -public: - static SimulatorConfig *getInstance(void); - - // predefined screen size - int getScreenSizeCount(void); - const SimulatorScreenSize getScreenSize(int index); - -private: - SimulatorConfig(void); - static SimulatorConfig *s_sharedInstance; - ScreenSizeArray m_screenSizeArray; -}; - -#endif // _RUNTIME__H_ - diff --git a/templates/multi-platform-js-runtime/framework/build_runtime.py b/templates/multi-platform-js-runtime/framework/build_runtime.py deleted file mode 100644 index 06b0dc9d5a..0000000000 --- a/templates/multi-platform-js-runtime/framework/build_runtime.py +++ /dev/null @@ -1,419 +0,0 @@ -#! /usr/bin/env python -# coding=utf-8 -# filename=build_runtime.py - -import os -import re -import sys -import shutil -import platform -import subprocess - -if platform.system() == 'Windows': - import _winreg - - -def checkParams(): - """Custom and check param list. - """ - from optparse import OptionParser - # set the parser to parse input params - # the correspond variable name of "-x, --xxx" is parser.xxx - - if platform.system() == "Darwin": - parser = OptionParser( - usage="Usage: %prog -p \n\ - Sample: %prog -p ios" - ) - parser.add_option( - "-p", - "--platform", - metavar="PLATFORM", - type="choice", - choices=["android", "ios", "mac"], - help="Set build runtime's platform" - ) - elif platform.system() == "Windows": - parser = OptionParser( - usage="Usage: %prog -p \n\ - Sample: %prog -p win32" - ) - parser.add_option( - "-p", - "--platform", - metavar="PLATFORM", - type="choice", - choices=["win32", "android"], - help="Set build runtime's platform" - ) - - parser.add_option( - "-u", - "--pure", - dest="pure", - action="store_true", - help="parameter for copy resource" - ) - - # parse the params - (opts, args) = parser.parse_args() - if not opts.platform: - parser.error("-p or --platform is not specified") - if not opts.pure: - return opts.platform, None - return opts.platform, opts.pure - - -class BuildRuntime: - - def __init__(self, platform, pure): - self.projectPath = None - self.projectName = None - self.runtimePlatform = platform - self.pure = pure - - scriptPath = os.path.abspath(os.path.dirname(__file__)) - if platform == 'win32': - self.projectPath = os.path.join(scriptPath, "proj.win32") - elif platform == 'android': - self.projectPath = os.path.join(scriptPath, "proj.android") - elif platform == 'ios': - self.projectPath = os.path.join(scriptPath, "proj.ios_mac") - elif platform == 'mac': - self.projectPath = os.path.join(scriptPath, "proj.ios_mac") - - def buildRuntime(self): - if self.runtimePlatform == 'win32': - self.win32Runtime() - elif self.runtimePlatform == 'android': - self.androidRuntime() - if self.runtimePlatform == 'ios': - self.iosRuntime() - if self.runtimePlatform == 'mac': - self.macRuntime() - - def macRuntime(self): - commands = [ - "xcodebuild", - "-version" - ] - child = subprocess.Popen(commands, stdout=subprocess.PIPE) - - xcode = None - version = None - for line in child.stdout: - if 'Xcode' in line: - xcode, version = str.split(line, ' ') - - child.wait() - - if xcode is None: - print ("Xcode wasn't installed") - return False - - if version <= '5': - print ("Update xcode please") - return False - - res = self.checkFileByExtention(".xcodeproj") - if not res: - print ("Can't find the \".xcodeproj\" file") - return False - - projectPath = os.path.join(self.projectPath, self.projectName) - pbxprojectPath = os.path.join(projectPath, "project.pbxproj") - print(pbxprojectPath) - - f = file(pbxprojectPath) - contents = f.read() - - section = re.search( - r"Begin PBXProject section.*End PBXProject section", - contents, - re.S - ) - - if section is None: - print ("Can't find Mac target") - return False - - targets = re.search(r"targets = (.*);", section.group(), re.S) - if targets is None: - print ("Can't find Mac target") - return False - - targetName = None - names = re.split("\*", targets.group()) - for name in names: - if "Mac" in name: - targetName = str.strip(name) - - if targetName is None: - print ("Can't find Mac target") - return False - - macFolder = os.path.join(self.projectPath, "..", "..", "runtime", "mac") - if os.path.isdir(macFolder): - shutil.rmtree(macFolder) - - commands = [ - "xcodebuild", - "-project", - projectPath, - "-configuration", - "Debug", - "-target", - targetName, - "CONFIGURATION_BUILD_DIR=%s" % (macFolder) - ] - child = subprocess.Popen(commands, stdout=subprocess.PIPE) - for line in child.stdout: - print (line) - - child.wait() - - filelist = os.listdir(macFolder) - for filename in filelist: - name, extention = os.path.splitext(filename) - if extention == '.a': - filename = os.path.join(macFolder, filename) - os.remove(filename) - if extention == '.app': - filename = os.path.join(macFolder, filename) - if ' ' in name: - newname = os.path.join(macFolder, name[:name.find(' ')]+extention) - os.rename(filename, newname) - - def iosRuntime(self): - commands = [ - "xcodebuild", - "-version" - ] - child = subprocess.Popen(commands, stdout=subprocess.PIPE) - - xcode = None - version = None - for line in child.stdout: - if 'Xcode' in line: - xcode, version = str.split(line, ' ') - - child.wait() - - if xcode is None: - print ("Xcode wasn't installed") - return False - - if version <= '5': - print ("Update xcode please") - return False - - res = self.checkFileByExtention(".xcodeproj") - if not res: - print ("Can't find the \".xcodeproj\" file") - return False - - projectPath = os.path.join(self.projectPath, self.projectName) - pbxprojectPath = os.path.join(projectPath, "project.pbxproj") - print(pbxprojectPath) - - f = file(pbxprojectPath) - contents = f.read() - - section = re.search(r"Begin PBXProject section.*End PBXProject section", contents, re.S) - - if section is None: - print ("Can't find iOS target") - return False - - targets = re.search(r"targets = (.*);", section.group(), re.S) - if targets is None: - print ("Can't find iOS target") - return False - - targetName = None - names = re.split("\*", targets.group()) - for name in names: - if "iOS" in name: - targetName = str.strip(name) - - if targetName is None: - print ("Can't find iOS target") - return False - - iosFolder = os.path.join(self.projectPath, "..", "..", "runtime", "ios") - if os.path.isdir(iosFolder): - filelist = os.listdir(iosFolder) - for filename in filelist: - if ".app" in filename: - f = os.path.join(iosFolder, filename) - shutil.rmtree(f) - - commands = [ - "xcodebuild", - "-project", - projectPath, - "-configuration", - "Debug", - "-target", - targetName, - "-sdk", - "iphonesimulator", - "CONFIGURATION_BUILD_DIR=%s" % (iosFolder) - ] - child = subprocess.Popen(commands, stdout=subprocess.PIPE) - for line in child.stdout: - print (line) - - child.wait() - - filelist = os.listdir(iosFolder) - - for filename in filelist: - name, extention = os.path.splitext(filename) - if extention == '.a': - filename = os.path.join(iosFolder, filename) - os.remove(filename) - if extention == '.app': - filename = os.path.join(iosFolder, filename) - newname = os.path.join(iosFolder, name[:name.find(' ')]+extention) - os.rename(filename, newname) - - def androidRuntime(self): - try: - SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] - except Exception: - print ("ANDROID_SDK_ROOT not defined.\ - Please define ANDROID_SDK_ROOT in your environment") - return False - - try: - NDK_ROOT = os.environ['NDK_ROOT'] - except Exception: - print ("NDK_ROOT not defined.\ - Please define NDK_ROOT in your environment") - return False - - platformsPath = os.path.join(SDK_ROOT,"platforms") - if not os.path.isdir(platformsPath): - print ("Can't find android platforms") - return False - - platforms = os.listdir(platformsPath) - versions = [] - for platform in platforms: - if "android-" in platform: - version = platform[platform.find('-')+1:] - versions.append(version) - - maxVersion = max(map(float, versions)) - if maxVersion <= 10.0: - print ("Update android sdk please") - return False - - buildNative = os.path.join(self.projectPath, "build_native.py") - if not os.path.isdir(self.projectPath) or not os.path.isfile(buildNative): - print ("Can't find the build_native.py") - return False - - sys.path.append(self.projectPath) - from build_native import build - build(None, str(int(maxVersion)), None, self.pure) - - def win32Runtime(self): - try: - vs = _winreg.OpenKey( - _winreg.HKEY_LOCAL_MACHINE, - r"SOFTWARE\Microsoft\VisualStudio" - ) - - msbuild = _winreg.OpenKey( - _winreg.HKEY_LOCAL_MACHINE, - r"SOFTWARE\Microsoft\MSBuild\ToolsVersions" - ) - - except WindowsError: - print ("Visual Studio wasn't installed") - return False - - vsPath = None - i = 0 - try: - while True: - version = _winreg.EnumKey(vs, i) - try: - if float(version) >= 11.0: - key = _winreg.OpenKey(vs, r"SxS\VS7") - vsPath,type = _winreg.QueryValueEx(key, version) - except: - pass - i += 1 - except WindowsError: - pass - - if vsPath is None: - print("Can't find the Visual Studio's path in the regedit") - return False - - msbuildPath = None - i = 0 - try: - while True: - version = _winreg.EnumKey(msbuild,i) - try: - if float(version) >= 4.0: - key = _winreg.OpenKey(msbuild, version) - msbuildPath, type = _winreg.QueryValueEx( - key, - "MSBuildToolsPath" - ) - except: - pass - i += 1 - except WindowsError: - pass - - if msbuildPath is None: - print ("Can't find the MSBuildTools' path in the regedit") - return False - - res = self.checkFileByExtention(".sln") - if not res: - print ("Can't find the \".sln\" file") - return False - - msbuildPath = os.path.join(msbuildPath, "MSBuild.exe") - projectPath = os.path.join(self.projectPath, self.projectName) - commands = [ - msbuildPath, - projectPath, - "/maxcpucount:4", - "/t:build", - "/p:configuration=Debug" - ] - - child = subprocess.Popen(commands, stdout=subprocess.PIPE) - for line in child.stdout: - print (line) - - child.wait() - - return True - - def checkFileByExtention(self, ext, path=None): - filelist = "" - if path is None: - filelist = os.listdir(self.projectPath) - else: - filelist = os.listdir(path) - - for file in filelist: - name, extention = os.path.splitext(file) - if extention == ext: - self.projectName = file - return True - return False - -if __name__ == '__main__': - platform, pure = checkParams(); - buildRuntime = BuildRuntime(platform, pure) - buildRuntime.buildRuntime() diff --git a/templates/multi-platform-js-runtime/framework/proj.android/.classpath b/templates/multi-platform-js-runtime/framework/proj.android/.classpath deleted file mode 100644 index 0b08408342..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/.project b/templates/multi-platform-js-runtime/framework/proj.android/.project deleted file mode 100644 index df461895c5..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/.project +++ /dev/null @@ -1,65 +0,0 @@ - - - HelloJavascript - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - Classes - 2 - COCOS2DX/projects/HelloJavascript/Classes - - - cocos2dx - 2 - COCOS2DX/cocos2dx - - - extensions - 2 - COCOS2DX/extensions - - - scripting - 2 - COCOS2DX/scripting - - - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml b/templates/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml deleted file mode 100644 index 0f79a7e741..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/AndroidManifest.xml +++ /dev/null @@ -1,37 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/README.md b/templates/multi-platform-js-runtime/framework/proj.android/README.md deleted file mode 100644 index 312835611a..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/README.md +++ /dev/null @@ -1,87 +0,0 @@ -## Prerequisites: - -* Android NDK -* Android SDK **OR** Eclipse ADT Bundle -* Android AVD target installed - -## Building project - -There are two ways of building Android projects. - -1. Eclipse -2. Command Line - -### Import Project in Eclipse - -#### Features: - -1. Complete workflow from Eclipse, including: - * Build C++. - * Clean C++. - * Build and Run whole project. - * Logcat view. - * Debug Java code. - * Javascript editor. - * Project management. -2. True C++ editing, including: - * Code completion. - * Jump to definition. - * Refactoring tools etc. - * Quick open C++ files. - - -#### Setup Eclipse Environment (only once) - - -**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. - -1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) - - **OR** - - Install Eclipse with Java. Add ADT and CDT plugins. - -2. Only for Windows - 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). - 2. Add `Cygwin\bin` directory to system PATH variable. - 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. - -3. Set up Variables: - 1. Path Variable `COCOS2DX`: - * Eclipse->Preferences->General->Workspace->**Linked Resources** - * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. - ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) - - 2. C/C++ Environment Variable `NDK_ROOT`: - * Eclipse->Preferences->C/C++->Build->**Environment**. - * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. - ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) - * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` - -4. Import libcocos2dx library project: - 1. File->New->Project->Android Project From Existing Code. - 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. - 3. Click **Finish** to add project. - -#### Adding and running from Eclipse - -![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) - -1. File->New->Project->Android Project From Existing Code -2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` -3. Add the project -4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. - - -### Running project from Command Line - - $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ - $ export NDK_ROOT=/path/to/ndk - $ ./build_native.sh - $ ant debug install - -If the last command results in sdk.dir missing error then do: - - $ android list target - $ android update project -p . -t (id from step 6) - $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/templates/multi-platform-js-runtime/framework/proj.android/ant.properties b/templates/multi-platform-js-runtime/framework/proj.android/ant.properties deleted file mode 100644 index f8af38bfb4..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/ant.properties +++ /dev/null @@ -1 +0,0 @@ -aapt.ignore.assets="!*.pvr.gz:!*.gz:!.svn:!.git:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" diff --git a/templates/multi-platform-js-runtime/framework/proj.android/build.xml b/templates/multi-platform-js-runtime/framework/proj.android/build.xml deleted file mode 100644 index b46375fda9..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/build_native.py b/templates/multi-platform-js-runtime/framework/proj.android/build_native.py deleted file mode 100644 index 7e08a0a94a..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/build_native.py +++ /dev/null @@ -1,200 +0,0 @@ -#!/usr/bin/python -# build_native.py -# Build native codes - - -import sys -import os, os.path -import shutil -from optparse import OptionParser - -def get_num_of_cpu(): - ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. - ''' - try: - platform = sys.platform - if platform == 'win32': - if 'NUMBER_OF_PROCESSORS' in os.environ: - return int(os.environ['NUMBER_OF_PROCESSORS']) - else: - return 1 - else: - from numpy.distutils import cpuinfo - return cpuinfo.cpu._getNCPUs() - except Exception: - print "Can't know cpuinfo, use default 1 cpu" - return 1 -def check_environment_variables_sdk(): - ''' Checking the environment ANDROID_SDK_ROOT, which will be used for building - ''' - - try: - SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] - except Exception: - print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment" - sys.exit(1) - - return SDK_ROOT - -def check_environment_variables(): - ''' Checking the environment NDK_ROOT, which will be used for building - ''' - - try: - NDK_ROOT = os.environ['NDK_ROOT'] - except Exception: - print "NDK_ROOT not defined. Please define NDK_ROOT in your environment" - sys.exit(1) - - return NDK_ROOT - -def select_toolchain_version(): - '''Because ndk-r8e uses gcc4.6 as default. gcc4.6 doesn't support c++11. So we should select gcc4.7 when - using ndk-r8e. But gcc4.7 is removed in ndk-r9, so we should determine whether gcc4.7 exist. - Conclution: - ndk-r8e -> use gcc4.7 - ndk-r9 -> use gcc4.8 - ''' - - ndk_root = check_environment_variables() - if os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.8")): - os.environ['NDK_TOOLCHAIN_VERSION'] = '4.8' - print "The Selected NDK toolchain version was 4.8 !" - elif os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.7")): - os.environ['NDK_TOOLCHAIN_VERSION'] = '4.7' - print "The Selected NDK toolchain version was 4.7 !" - else: - print "Couldn't find the gcc toolchain." - exit(1) - -def check_ant_variables(): - ''' Checking the environment ANT, which will be used for package - ''' - try: - ANT_PATH = os.environ['ANT_PATH'] - except Exception: - print "ANT_PATH not defined. Please define ANT_PATH in your environment" - sys.exit(1) - - return ANT_PATH - -def do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode): - - ndk_path = os.path.join(ndk_root, "ndk-build") - - # windows should use ";" to seperate module paths - platform = sys.platform - if platform == 'win32': - ndk_module_path = 'NDK_MODULE_PATH=%s;%s/external;%s/cocos' % (cocos_root, cocos_root, cocos_root) - else: - ndk_module_path = 'NDK_MODULE_PATH=%s:%s/external:%s/cocos' % (cocos_root, cocos_root, cocos_root) - - num_of_cpu = get_num_of_cpu() - if ndk_build_param == None: - command = '%s -j%d -C %s %s' % (ndk_path, num_of_cpu, app_android_root, ndk_module_path) - else: - command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ''.join(str(e) for e in ndk_build_param), ndk_module_path) - if os.system(command) != 0: - raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") - elif android_platform is not None: - sdk_tool_path = os.path.join(sdk_root, "tools/android") - cocoslib_path = os.path.join(cocos_root, "cocos/2d/platform/android/java") - command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path) - if os.system(command) != 0: - raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!") - command = '%s update project -t %s -p %s -s' % (sdk_tool_path,android_platform,app_android_root) - if os.system(command) != 0: - raise Exception("update project [ " + app_android_root + " ] fails!") - ant_path=check_ant_variables() - ant_path = os.path.join(ant_path, "ant") - buildfile_path = os.path.join(app_android_root, "build.xml") - command = '%s clean %s -f %s -Dsdk.dir=%s' % (ant_path,build_mode,buildfile_path,sdk_root) - os.system(command) - -def copy_files(src, dst): - - for item in os.listdir(src): - path = os.path.join(src, item) - # Android can not package the file that ends with ".gz" - if not item.startswith('.') and not item.endswith('.gz') and os.path.isfile(path): - shutil.copy(path, dst) - if os.path.isdir(path): - new_dst = os.path.join(dst, item) - os.makedirs(new_dst) - copy_files(path, new_dst) - -def copy_resources(app_android_root, build_mode, pure): - - # remove app_android_root/assets if it exists - assets_dir = os.path.join(app_android_root, "assets") - if os.path.isdir(assets_dir): - shutil.rmtree(assets_dir) - - #""" - os.makedirs(assets_dir) - if pure is None: - jsResource = os.path.join(app_android_root, "../../") - dirlist = os.listdir(jsResource) - for line in dirlist: - if line == "framework" or line == "runtime" or line == ".project": - continue - fullpath = os.path.join(jsResource, line) - if os.path.isfile(fullpath): - shutil.copy(fullpath, assets_dir) - else: - dstDir = "%s/%s" %(assets_dir,line) - os.makedirs(dstDir) - copy_files(fullpath, dstDir) - #""" - # copy resources - """ - os.mkdir(assets_dir) - resources_dir = os.path.join(app_android_root, "../Resources") - if os.path.isdir(resources_dir): - copy_files(resources_dir, assets_dir) - """ - - # jsb project should copy javascript files and resources(shared with cocos2d-html5) - resources_dir = os.path.join(app_android_root, "../cocos2d/cocos/scripting/javascript/script") - copy_files(resources_dir, assets_dir) - -def build(ndk_build_param,android_platform,build_mode,pure): - - ndk_root = check_environment_variables() - sdk_root = None - select_toolchain_version() - - current_dir = os.path.dirname(os.path.realpath(__file__)) - cocos_root = os.path.join(current_dir, "../cocos2d") - - app_android_root = current_dir - copy_resources(app_android_root, build_mode, pure) - - if android_platform is not None: - sdk_root = check_environment_variables_sdk() - if android_platform.isdigit(): - android_platform = 'android-'+android_platform - else: - print 'please use vaild android platform' - exit(1) - - if build_mode is None: - build_mode = 'debug' - elif build_mode != 'release': - build_mode = 'debug' - - do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) - -# -------------- main -------------- -if __name__ == '__main__': - - parser = OptionParser() - parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build') - parser.add_option("-p", "--platform", dest="android_platform", - help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') - parser.add_option("-b", "--build", dest="build_mode", - help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') - parser.add_option("-u", "--pure", dest="pure", help='parameter for copy resource') - (opts, args) = parser.parse_args() - - build(opts.ndk_build_param,opts.android_platform,opts.build_mode,opts.pure) diff --git a/templates/multi-platform-js-runtime/framework/proj.android/custom_rules.xml b/templates/multi-platform-js-runtime/framework/proj.android/custom_rules.xml deleted file mode 100644 index 3cc45b7a2f..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/custom_rules.xml +++ /dev/null @@ -1,12 +0,0 @@ - - - - - - - - - - - - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/jni/Android.mk b/templates/multi-platform-js-runtime/framework/proj.android/jni/Android.mk deleted file mode 100644 index e0c5dbaa8c..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/jni/Android.mk +++ /dev/null @@ -1,33 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := cocos2djs_shared - -LOCAL_MODULE_FILENAME := libcocos2djs - -LOCAL_SRC_FILES := hellojavascript/main.cpp \ - hellojavascript/Runtime_android.cpp \ - ../../Classes/AppDelegate.cpp \ - ../../Classes/Runtime.cpp - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes - -LOCAL_WHOLE_STATIC_LIBRARIES := cocos_jsb_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_extension_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_chipmunk_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_localstorage_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_network_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_builder_static - -LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT - -include $(BUILD_SHARED_LIBRARY) - - -$(call import-module,scripting/javascript/bindings) -$(call import-module,scripting/javascript/bindings/extension) -$(call import-module,scripting/javascript/bindings/chipmunk) -$(call import-module,scripting/javascript/bindings/localstorage) -$(call import-module,scripting/javascript/bindings/network) -$(call import-module,scripting/javascript/bindings/cocosbuilder) \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.android/jni/Application.mk b/templates/multi-platform-js-runtime/framework/proj.android/jni/Application.mk deleted file mode 100644 index 76c0f20fca..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/jni/Application.mk +++ /dev/null @@ -1,4 +0,0 @@ -APP_STL := gnustl_static -APP_CPPFLAGS := -frtti -APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp b/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp deleted file mode 100644 index 8c1e608d2d..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/Runtime_android.cpp +++ /dev/null @@ -1,29 +0,0 @@ -#include -#include -using namespace std; - -string getProjSearchPath() -{ - extern std::string getPackageNameJNI(); - string searchPath = "/mnt/sdcard/"; - searchPath += getPackageNameJNI(); - return searchPath; -} - -vector getSearchPath() -{ - extern std::string getPackageNameJNI(); - vector searchPathArray; - searchPathArray.push_back(getProjSearchPath()); - return searchPathArray; -} - -string getDotWaitFilePath() -{ - extern std::string getPackageNameJNI(); - string searchPath = getPackageNameJNI(); - string dotwaitFile = "/mnt/sdcard/"; - dotwaitFile += searchPath; - dotwaitFile += "/.wait"; - return dotwaitFile; -} diff --git a/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp b/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp deleted file mode 100644 index 9793beefb1..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/jni/hellojavascript/main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "AppDelegate.h" -#include "cocos2d.h" -#include "platform/android/jni/JniHelper.h" -#include "CCEventType.h" -#include -#include - -#define LOG_TAG "main" -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) - -using namespace cocos2d; - -void cocos_android_app_init (struct android_app* app) { - LOGD("cocos_android_app_init"); - AppDelegate *pAppDelegate = new AppDelegate(); -} diff --git a/templates/multi-platform-js-runtime/framework/proj.android/proguard-project.txt b/templates/multi-platform-js-runtime/framework/proj.android/proguard-project.txt deleted file mode 100644 index f2fe1559a2..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/templates/multi-platform-js-runtime/framework/proj.android/project.properties b/templates/multi-platform-js-runtime/framework/proj.android/project.properties deleted file mode 100644 index 5c817aa115..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/project.properties +++ /dev/null @@ -1,13 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-19 - -android.library.reference.1=../cocos2d/cocos/2d/platform/android/java diff --git a/templates/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml b/templates/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml deleted file mode 100644 index c847de2851..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - HelloJavascript - diff --git a/templates/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java b/templates/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java deleted file mode 100644 index 928da4653a..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cocos2dx.javascript; - -import android.app.NativeActivity; -import android.os.Bundle; - -public class Cocos2dxActivity extends NativeActivity{ - - @Override - protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub - super.onCreate(savedInstanceState); - - //For supports translucency - - //1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp - /*const EGLint attribs[] = { - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - //EGL_BLUE_SIZE, 5, -->delete - //EGL_GREEN_SIZE, 6, -->delete - //EGL_RED_SIZE, 5, -->delete - EGL_BUFFER_SIZE, 32, //-->new field - EGL_DEPTH_SIZE, 16, - EGL_STENCIL_SIZE, 8, - EGL_NONE - };*/ - - //2.Set the format of window - // getWindow().setFormat(PixelFormat.TRANSLUCENT); - - } -} diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/templates/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj deleted file mode 100644 index 1eba8ad60f..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1137 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 013F8DBC1887C10F008B7106 /* cocos2d-jsb.js in Sources */ = {isa = PBXBuildFile; fileRef = 013F8DB91887C10F008B7106 /* cocos2d-jsb.js */; }; - 013F8DBD1887C10F008B7106 /* cocos2d-jsb.js in Sources */ = {isa = PBXBuildFile; fileRef = 013F8DB91887C10F008B7106 /* cocos2d-jsb.js */; }; - 013F8DBE1887C10F008B7106 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 013F8DBA1887C10F008B7106 /* res */; }; - 013F8DBF1887C10F008B7106 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 013F8DBA1887C10F008B7106 /* res */; }; - 013F8DC01887C10F008B7106 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 013F8DBB1887C10F008B7106 /* src */; }; - 013F8DC11887C10F008B7106 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 013F8DBB1887C10F008B7106 /* src */; }; - 01A11FDC1887C40500ADD6C1 /* cocos2d-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 013F8DB91887C10F008B7106 /* cocos2d-jsb.js */; }; - 01A11FDD1887C43300ADD6C1 /* cocos2d-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 013F8DB91887C10F008B7106 /* cocos2d-jsb.js */; }; - 15FD5C6B183A6170005CFF55 /* jsb_cocos2d_gui.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */; }; - 15FD5C6C183A6170005CFF55 /* jsb_cocos2d_studio.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */; }; - 15FD5C6F183A618A005CFF55 /* jsb_cocos2d_gui.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */; }; - 15FD5C70183A618A005CFF55 /* jsb_cocos2d_studio.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */; }; - 1A6767FA180E9B160076BC67 /* debugger in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767ED180E9B160076BC67 /* debugger */; }; - 1A6767FB180E9B160076BC67 /* debugger in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767ED180E9B160076BC67 /* debugger */; }; - 1A676829180E9C060076BC67 /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */; }; - 1A67682A180E9C060076BC67 /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */; }; - 1A67682B180E9C060076BC67 /* libcocos2dx-extensions Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */; }; - 1A67682C180E9C060076BC67 /* libCocosDenshion Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */; }; - 1A67682D180E9C060076BC67 /* libjsbindings Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB52180E9ACB004C840B /* libjsbindings Mac.a */; }; - 1A676838180E9C1E0076BC67 /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */; }; - 1A676839180E9C1E0076BC67 /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */; }; - 1A67683A180E9C1E0076BC67 /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */; }; - 1A67683B180E9C1E0076BC67 /* libCocosDenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */; }; - 1A67683C180E9C1E0076BC67 /* libjsbindings iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB60180E9ACB004C840B /* libjsbindings iOS.a */; }; - 1A67683E180E9CE90076BC67 /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */; }; - 1A67683F180E9CE90076BC67 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */; }; - 1A676840180E9CE90076BC67 /* jsb_cocos2d_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */; }; - 1A676841180E9CE90076BC67 /* jsb_cocos2d_extension.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */; }; - 1A676842180E9CE90076BC67 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */; }; - 1A676843180E9CE90076BC67 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */; }; - 1A676844180E9CE90076BC67 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F4180E9B160076BC67 /* jsb_debugger.js */; }; - 1A676845180E9CE90076BC67 /* jsb_deprecated.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */; }; - 1A676846180E9CE90076BC67 /* jsb_opengl_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */; }; - 1A676847180E9CE90076BC67 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F7180E9B160076BC67 /* jsb_opengl.js */; }; - 1A676848180E9CE90076BC67 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F8180E9B160076BC67 /* jsb_sys.js */; }; - 1A676849180E9CE90076BC67 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F9180E9B160076BC67 /* jsb.js */; }; - 1A67684A180E9CF10076BC67 /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */; }; - 1A67684B180E9CF10076BC67 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */; }; - 1A67684C180E9CF10076BC67 /* jsb_cocos2d_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */; }; - 1A67684D180E9CF10076BC67 /* jsb_cocos2d_extension.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */; }; - 1A67684E180E9CF10076BC67 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */; }; - 1A67684F180E9CF10076BC67 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */; }; - 1A676850180E9CF10076BC67 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F4180E9B160076BC67 /* jsb_debugger.js */; }; - 1A676851180E9CF10076BC67 /* jsb_deprecated.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */; }; - 1A676852180E9CF10076BC67 /* jsb_opengl_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */; }; - 1A676853180E9CF10076BC67 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F7180E9B160076BC67 /* jsb_opengl.js */; }; - 1A676854180E9CF10076BC67 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F8180E9B160076BC67 /* jsb_sys.js */; }; - 1A676855180E9CF10076BC67 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F9180E9B160076BC67 /* jsb.js */; }; - 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; - 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 502380DB17EBB88200990C9B /* libcurl.dylib */; }; - 5091731A17ECDF7A00D62437 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731417ECDF7A00D62437 /* Icon-29.png */; }; - 5091731B17ECDF7A00D62437 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731517ECDF7A00D62437 /* Icon-40.png */; }; - 5091731C17ECDF7A00D62437 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731617ECDF7A00D62437 /* Icon-50.png */; }; - 5091731D17ECDF7A00D62437 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731717ECDF7A00D62437 /* Icon-58.png */; }; - 5091731E17ECDF7A00D62437 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731817ECDF7A00D62437 /* Icon-80.png */; }; - 5091731F17ECDF7A00D62437 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731917ECDF7A00D62437 /* Icon-100.png */; }; - 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; - 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; - 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; - 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; - 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; - 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; - 509D4A8E17EBB24E00697056 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; }; - 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; - 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; - 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AAC17EBB2AB00697056 /* AppController.mm */; }; - 509D4ABD17EBB2AB00697056 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */; }; - 509D4ABE17EBB2AB00697056 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAE17EBB2AB00697056 /* Default.png */; }; - 509D4ABF17EBB2AB00697056 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAF17EBB2AB00697056 /* Default@2x.png */; }; - 509D4AC017EBB2AB00697056 /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB017EBB2AB00697056 /* Icon-57.png */; }; - 509D4AC117EBB2AB00697056 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB117EBB2AB00697056 /* Icon-72.png */; }; - 509D4AC217EBB2AB00697056 /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB217EBB2AB00697056 /* Icon-76.png */; }; - 509D4AC317EBB2AB00697056 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB317EBB2AB00697056 /* Icon-114.png */; }; - 509D4AC417EBB2AB00697056 /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB417EBB2AB00697056 /* Icon-120.png */; }; - 509D4AC517EBB2AB00697056 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB517EBB2AB00697056 /* Icon-144.png */; }; - 509D4AC617EBB2AB00697056 /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB617EBB2AB00697056 /* Icon-152.png */; }; - 509D4AC817EBB2AB00697056 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AB817EBB2AB00697056 /* main.m */; }; - 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4ABB17EBB2AB00697056 /* RootViewController.mm */; }; - 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 509D4ACB17EBB2BE00697056 /* Icon.icns */; }; - 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE617EBB81800697056 /* OpenGL.framework */; }; - 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE817EBB82000697056 /* AppKit.framework */; }; - 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AEA17EBB82600697056 /* IOKit.framework */; }; - 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 */; }; - C026DCC618928A1A00B3EDE8 /* Runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C026DCC518928A1A00B3EDE8 /* Runtime.cpp */; }; - C026DCC718928A1A00B3EDE8 /* Runtime.cpp in Sources */ = {isa = PBXBuildFile; fileRef = C026DCC518928A1A00B3EDE8 /* Runtime.cpp */; }; - C026DCC918928A2400B3EDE8 /* Runtime_ios-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C026DCC818928A2400B3EDE8 /* Runtime_ios-mac.mm */; }; - C026DCCA18928A2400B3EDE8 /* Runtime_ios-mac.mm in Sources */ = {isa = PBXBuildFile; fileRef = C026DCC818928A2400B3EDE8 /* Runtime_ios-mac.mm */; }; - C03C8B4B18A770DD00723415 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = C03C8B4818A770DD00723415 /* main.m */; }; - C03C8B4C18A770DD00723415 /* MainMenu.xib in Resources */ = {isa = PBXBuildFile; fileRef = C03C8B4918A770DD00723415 /* MainMenu.xib */; }; - C0C2F37418AA0C66003976DA /* SimulatorApp.mm in Sources */ = {isa = PBXBuildFile; fileRef = C0C2F37318AA0C66003976DA /* SimulatorApp.mm */; }; - D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; - D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; - D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B061231803AB9F0077942B /* CoreMotion.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1A67681F180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1551A33E158F2AB200E66CFE; - remoteInfo = "cocos2dx Mac"; - }; - 1A676821180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F2FC117814595006731B9; - remoteInfo = "cocos2dx-extensions Mac"; - }; - 1A676823180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F2B781780BD04006731B9; - remoteInfo = "chipmunk Mac"; - }; - 1A676825180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F2E9817814268006731B9; - remoteInfo = "CocosDenshion Mac"; - }; - 1A676827180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F31E81781479B006731B9; - remoteInfo = "jsbindings Mac"; - }; - 1A67682E180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4C241783777C0073F6A7; - remoteInfo = "cocos2dx iOS"; - }; - 1A676830180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4E111783867C0073F6A7; - remoteInfo = "cocos2dx-extensions iOS"; - }; - 1A676832180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4EFD178387670073F6A7; - remoteInfo = "chipmunk iOS"; - }; - 1A676834180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4F9F178387730073F6A7; - remoteInfo = "CocosDenshion iOS"; - }; - 1A676836180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4FB5178387750073F6A7; - remoteInfo = "jsbindings iOS"; - }; - 1AC6FB47180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1551A33F158F2AB200E66CFE; - remoteInfo = "cocos2dx Mac"; - }; - 1AC6FB49180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2FD617814595006731B9; - remoteInfo = "cocos2dx-extensions Mac"; - }; - 1AC6FB4B180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2CB81780BD04006731B9; - remoteInfo = "chipmunk Mac"; - }; - 1AC6FB4D180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2D9B1780BDF7006731B9; - remoteInfo = "box2d Mac"; - }; - 1AC6FB4F180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2ED617814268006731B9; - remoteInfo = "CocosDenshion Mac"; - }; - 1AC6FB51180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F31FD1781479B006731B9; - remoteInfo = "jsbindings Mac"; - }; - 1AC6FB53180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1A6FB53017854BC300CDF010; - remoteInfo = "luabindings Mac"; - }; - 1AC6FB55180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4D641783777C0073F6A7; - remoteInfo = "cocos2dx iOS"; - }; - 1AC6FB57180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4EFC1783867C0073F6A7; - remoteInfo = "cocos2dx-extensions iOS"; - }; - 1AC6FB59180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4F3B178387670073F6A7; - remoteInfo = "chipmunk iOS"; - }; - 1AC6FB5B180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4F9E1783876B0073F6A7; - remoteInfo = "box2d iOS"; - }; - 1AC6FB5D180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4FB4178387730073F6A7; - remoteInfo = "CocosDenshion iOS"; - }; - 1AC6FB5F180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A5030178387750073F6A7; - remoteInfo = "jsbindings iOS"; - }; - 1AC6FB61180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1A119791178526AA00D62A44; - remoteInfo = "luabindings iOS"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 013F8DB91887C10F008B7106 /* cocos2d-jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = "cocos2d-jsb.js"; path = "../../cocos2d-jsb.js"; sourceTree = ""; }; - 013F8DBA1887C10F008B7106 /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../../res; sourceTree = ""; }; - 013F8DBB1887C10F008B7106 /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../../src; sourceTree = ""; }; - 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; - 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; - 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; - 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; - 1A6767ED180E9B160076BC67 /* debugger */ = {isa = PBXFileReference; lastKnownFileType = folder; name = debugger; path = ../cocos2d/cocos/scripting/javascript/script/debugger; sourceTree = ""; }; - 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_chipmunk_constants.js; sourceTree = ""; }; - 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_chipmunk.js; sourceTree = ""; }; - 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_constants.js; sourceTree = ""; }; - 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_extension.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_extension.js; sourceTree = ""; }; - 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d.js; sourceTree = ""; }; - 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocosbuilder.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocosbuilder.js; sourceTree = ""; }; - 1A6767F4180E9B160076BC67 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_debugger.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_debugger.js; sourceTree = ""; }; - 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_deprecated.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_deprecated.js; sourceTree = ""; }; - 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_opengl_constants.js; sourceTree = ""; }; - 1A6767F7180E9B160076BC67 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_opengl.js; sourceTree = ""; }; - 1A6767F8180E9B160076BC67 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_sys.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_sys.js; sourceTree = ""; }; - 1A6767F9180E9B160076BC67 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb.js; sourceTree = ""; }; - 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; - 1A96A4F2174A3432008653A9 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../cocos2d/cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; - 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; - 502380DB17EBB88200990C9B /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; - 5091731417ECDF7A00D62437 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-29.png"; path = "ios/Icon-29.png"; sourceTree = ""; }; - 5091731517ECDF7A00D62437 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-40.png"; path = "ios/Icon-40.png"; sourceTree = ""; }; - 5091731617ECDF7A00D62437 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-50.png"; path = "ios/Icon-50.png"; sourceTree = ""; }; - 5091731717ECDF7A00D62437 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-58.png"; path = "ios/Icon-58.png"; sourceTree = ""; }; - 5091731817ECDF7A00D62437 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-80.png"; path = "ios/Icon-80.png"; sourceTree = ""; }; - 5091731917ECDF7A00D62437 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-100.png"; path = "ios/Icon-100.png"; sourceTree = ""; }; - 509D4AAA17EBB24E00697056 /* HelloJavascript Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloJavascript Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 509D4AAB17EBB2AB00697056 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = ""; }; - 509D4AAC17EBB2AB00697056 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = ""; }; - 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "ios/Default-568h@2x.png"; sourceTree = ""; }; - 509D4AAE17EBB2AB00697056 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ios/Default.png; sourceTree = ""; }; - 509D4AAF17EBB2AB00697056 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "ios/Default@2x.png"; sourceTree = ""; }; - 509D4AB017EBB2AB00697056 /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-57.png"; path = "ios/Icon-57.png"; sourceTree = ""; }; - 509D4AB117EBB2AB00697056 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "ios/Icon-72.png"; sourceTree = ""; }; - 509D4AB217EBB2AB00697056 /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-76.png"; path = "ios/Icon-76.png"; sourceTree = ""; }; - 509D4AB317EBB2AB00697056 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-114.png"; path = "ios/Icon-114.png"; sourceTree = ""; }; - 509D4AB417EBB2AB00697056 /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-120.png"; path = "ios/Icon-120.png"; sourceTree = ""; }; - 509D4AB517EBB2AB00697056 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-144.png"; path = "ios/Icon-144.png"; sourceTree = ""; }; - 509D4AB617EBB2AB00697056 /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-152.png"; path = "ios/Icon-152.png"; sourceTree = ""; }; - 509D4AB717EBB2AB00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = ""; }; - 509D4AB817EBB2AB00697056 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = ""; }; - 509D4AB917EBB2AB00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = ""; }; - 509D4ABA17EBB2AB00697056 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = ""; }; - 509D4ABB17EBB2AB00697056 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = ""; }; - 509D4ACB17EBB2BE00697056 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; - 509D4ACC17EBB2BE00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 509D4ACE17EBB2BE00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 509D4AE617EBB81800697056 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; - 509D4AE817EBB82000697056 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 509D4AEA17EBB82600697056 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - A922753D1517C094001B78AA /* HelloJavascript iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloJavascript iOS.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; }; - C014EAEB188EA65400753BDC /* Runtime.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Runtime.h; sourceTree = ""; }; - C026DCC518928A1A00B3EDE8 /* Runtime.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = Runtime.cpp; sourceTree = ""; }; - C026DCC818928A2400B3EDE8 /* Runtime_ios-mac.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = "Runtime_ios-mac.mm"; sourceTree = SOURCE_ROOT; }; - C03C8B4818A770DD00723415 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - C03C8B4918A770DD00723415 /* MainMenu.xib */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = file.xib; path = MainMenu.xib; sourceTree = ""; }; - C0C2F37218AA0C66003976DA /* SimulatorApp.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimulatorApp.h; sourceTree = ""; }; - C0C2F37318AA0C66003976DA /* SimulatorApp.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimulatorApp.mm; sourceTree = ""; }; - D454520B156E22BD00887EB5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - D4545215156E28EF00887EB5 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; - D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - D6B061231803AB9F0077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 509D4A8217EBB24E00697056 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A676829180E9C060076BC67 /* libchipmunk Mac.a in Frameworks */, - 1A67682A180E9C060076BC67 /* libcocos2dx Mac.a in Frameworks */, - 1A67682B180E9C060076BC67 /* libcocos2dx-extensions Mac.a in Frameworks */, - 1A67682C180E9C060076BC67 /* libCocosDenshion Mac.a in Frameworks */, - 1A67682D180E9C060076BC67 /* libjsbindings Mac.a in Frameworks */, - 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */, - 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */, - 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */, - 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */, - 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */, - 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */, - 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */, - 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */, - 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */, - 509D4A8E17EBB24E00697056 /* AVFoundation.framework in Frameworks */, - 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */, - 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A922753A1517C094001B78AA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A676838180E9C1E0076BC67 /* libchipmunk iOS.a in Frameworks */, - 1A676839180E9C1E0076BC67 /* libcocos2dx iOS.a in Frameworks */, - 1A67683A180E9C1E0076BC67 /* libcocos2dx-extensions iOS.a in Frameworks */, - 1A67683B180E9C1E0076BC67 /* libCocosDenshion iOS.a in Frameworks */, - 1A67683C180E9C1E0076BC67 /* libjsbindings iOS.a in Frameworks */, - D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */, - 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */, - D454520C156E22BD00887EB5 /* libz.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 */ - 15628F5B15F0F5C2000CF24B /* Resources */ = { - isa = PBXGroup; - children = ( - 013F8DB91887C10F008B7106 /* cocos2d-jsb.js */, - 013F8DBA1887C10F008B7106 /* res */, - 013F8DBB1887C10F008B7106 /* src */, - ); - name = Resources; - sourceTree = ""; - }; - 1A6767EC180E9AF00076BC67 /* JS Common */ = { - isa = PBXGroup; - children = ( - 1A6767ED180E9B160076BC67 /* debugger */, - 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */, - 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */, - 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */, - 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */, - 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */, - 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */, - 1A6767F4180E9B160076BC67 /* jsb_debugger.js */, - 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */, - 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */, - 1A6767F7180E9B160076BC67 /* jsb_opengl.js */, - 1A6767F8180E9B160076BC67 /* jsb_sys.js */, - 1A6767F9180E9B160076BC67 /* jsb.js */, - ); - name = "JS Common"; - sourceTree = ""; - }; - 1AC6FB35180E9ACB004C840B /* Products */ = { - isa = PBXGroup; - children = ( - 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */, - 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */, - 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */, - 1AC6FB4E180E9ACB004C840B /* libbox2d Mac.a */, - 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */, - 1AC6FB52180E9ACB004C840B /* libjsbindings Mac.a */, - 1AC6FB54180E9ACB004C840B /* libluabindings Mac.a */, - 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */, - 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */, - 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */, - 1AC6FB5C180E9ACB004C840B /* libbox2d iOS.a */, - 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */, - 1AC6FB60180E9ACB004C840B /* libjsbindings iOS.a */, - 1AC6FB62180E9ACB004C840B /* libluabindings iOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 5091732E17ECDF8A00D62437 /* Icons */ = { - isa = PBXGroup; - children = ( - 5091731417ECDF7A00D62437 /* Icon-29.png */, - 5091731517ECDF7A00D62437 /* Icon-40.png */, - 5091731617ECDF7A00D62437 /* Icon-50.png */, - 5091731717ECDF7A00D62437 /* Icon-58.png */, - 5091731817ECDF7A00D62437 /* Icon-80.png */, - 5091731917ECDF7A00D62437 /* Icon-100.png */, - 509D4AB017EBB2AB00697056 /* Icon-57.png */, - 509D4AB117EBB2AB00697056 /* Icon-72.png */, - 509D4AB217EBB2AB00697056 /* Icon-76.png */, - 509D4AB317EBB2AB00697056 /* Icon-114.png */, - 509D4AB417EBB2AB00697056 /* Icon-120.png */, - 509D4AB517EBB2AB00697056 /* Icon-144.png */, - 509D4AB617EBB2AB00697056 /* Icon-152.png */, - ); - name = Icons; - sourceTree = ""; - }; - 509D4ACA17EBB2BE00697056 /* mac */ = { - isa = PBXGroup; - children = ( - C0C2F37218AA0C66003976DA /* SimulatorApp.h */, - C0C2F37318AA0C66003976DA /* SimulatorApp.mm */, - C03C8B4818A770DD00723415 /* main.m */, - C03C8B4918A770DD00723415 /* MainMenu.xib */, - 509D4ACB17EBB2BE00697056 /* Icon.icns */, - 509D4ACC17EBB2BE00697056 /* Info.plist */, - 509D4ACE17EBB2BE00697056 /* Prefix.pch */, - ); - path = mac; - sourceTree = ""; - }; - A92275321517C094001B78AA = { - isa = PBXGroup; - children = ( - 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */, - 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */, - 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */, - 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */, - 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */, - D4545214156E28EF00887EB5 /* Classes */, - A92275401517C094001B78AA /* Frameworks */, - D45446CC156DE73F00887EB5 /* ios */, - 1A6767EC180E9AF00076BC67 /* JS Common */, - 509D4ACA17EBB2BE00697056 /* mac */, - A922753E1517C094001B78AA /* Products */, - 15628F5B15F0F5C2000CF24B /* Resources */, - ); - sourceTree = ""; - }; - A922753E1517C094001B78AA /* Products */ = { - isa = PBXGroup; - children = ( - A922753D1517C094001B78AA /* HelloJavascript iOS.app */, - 509D4AAA17EBB24E00697056 /* HelloJavascript Mac.app */, - ); - name = Products; - sourceTree = ""; - }; - A92275401517C094001B78AA /* Frameworks */ = { - isa = PBXGroup; - children = ( - D6B061231803AB9F0077942B /* CoreMotion.framework */, - 502380DB17EBB88200990C9B /* libcurl.dylib */, - 509D4AEA17EBB82600697056 /* IOKit.framework */, - 509D4AE817EBB82000697056 /* AppKit.framework */, - 509D4AE617EBB81800697056 /* OpenGL.framework */, - 1A96A4F2174A3432008653A9 /* libcurl.a */, - 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */, - D454520B156E22BD00887EB5 /* libz.dylib */, - A92275411517C094001B78AA /* QuartzCore.framework */, - A92275431517C094001B78AA /* OpenGLES.framework */, - A92275451517C094001B78AA /* OpenAL.framework */, - A92275471517C094001B78AA /* AudioToolbox.framework */, - A92275491517C094001B78AA /* AVFoundation.framework */, - A922754B1517C094001B78AA /* UIKit.framework */, - A922754D1517C094001B78AA /* Foundation.framework */, - A922754F1517C094001B78AA /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - D45446CC156DE73F00887EB5 /* ios */ = { - isa = PBXGroup; - children = ( - 509D4AAB17EBB2AB00697056 /* AppController.h */, - 509D4AAC17EBB2AB00697056 /* AppController.mm */, - 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */, - 509D4AAE17EBB2AB00697056 /* Default.png */, - 509D4AAF17EBB2AB00697056 /* Default@2x.png */, - 5091732E17ECDF8A00D62437 /* Icons */, - 509D4AB717EBB2AB00697056 /* Info.plist */, - 509D4AB817EBB2AB00697056 /* main.m */, - 509D4AB917EBB2AB00697056 /* Prefix.pch */, - 509D4ABA17EBB2AB00697056 /* RootViewController.h */, - 509D4ABB17EBB2AB00697056 /* RootViewController.mm */, - ); - name = ios; - sourceTree = ""; - }; - D4545214156E28EF00887EB5 /* Classes */ = { - isa = PBXGroup; - children = ( - C026DCC818928A2400B3EDE8 /* Runtime_ios-mac.mm */, - C026DCC518928A1A00B3EDE8 /* Runtime.cpp */, - C014EAEB188EA65400753BDC /* Runtime.h */, - D4545215156E28EF00887EB5 /* AppDelegate.cpp */, - D4545216156E28EF00887EB5 /* AppDelegate.h */, - ); - name = Classes; - path = ../Classes; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 509D4A7517EBB24E00697056 /* HelloJavascript Mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript Mac" */; - buildPhases = ( - 509D4A8017EBB24E00697056 /* Sources */, - 509D4A9317EBB24E00697056 /* Resources */, - 509D4A8217EBB24E00697056 /* Frameworks */, - ); - buildRules = ( - ); - dependencies = ( - 1A676820180E9BF70076BC67 /* PBXTargetDependency */, - 1A676822180E9BF70076BC67 /* PBXTargetDependency */, - 1A676824180E9BF70076BC67 /* PBXTargetDependency */, - 1A676826180E9BF70076BC67 /* PBXTargetDependency */, - 1A676828180E9BF70076BC67 /* PBXTargetDependency */, - ); - name = "HelloJavascript Mac"; - productName = HelloJavascript; - productReference = 509D4AAA17EBB24E00697056 /* HelloJavascript Mac.app */; - productType = "com.apple.product-type.application"; - }; - A922753C1517C094001B78AA /* HelloJavascript iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript iOS" */; - buildPhases = ( - A92275391517C094001B78AA /* Sources */, - A922753A1517C094001B78AA /* Frameworks */, - A922753B1517C094001B78AA /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1A67682F180E9C110076BC67 /* PBXTargetDependency */, - 1A676831180E9C110076BC67 /* PBXTargetDependency */, - 1A676833180E9C110076BC67 /* PBXTargetDependency */, - 1A676835180E9C110076BC67 /* PBXTargetDependency */, - 1A676837180E9C110076BC67 /* PBXTargetDependency */, - ); - name = "HelloJavascript iOS"; - productName = HelloJavascript; - productReference = A922753D1517C094001B78AA /* HelloJavascript iOS.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A92275341517C094001B78AA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - TargetAttributes = { - A922753C1517C094001B78AA = { - DevelopmentTeam = MDDB52YB8L; - }; - }; - }; - buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "HelloJavascript" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A92275321517C094001B78AA; - productRefGroup = A922753E1517C094001B78AA /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1AC6FB35180E9ACB004C840B /* Products */; - ProjectRef = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - A922753C1517C094001B78AA /* HelloJavascript iOS */, - 509D4A7517EBB24E00697056 /* HelloJavascript Mac */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx Mac.a"; - remoteRef = 1AC6FB47180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx-extensions Mac.a"; - remoteRef = 1AC6FB49180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libchipmunk Mac.a"; - remoteRef = 1AC6FB4B180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB4E180E9ACB004C840B /* libbox2d Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libbox2d Mac.a"; - remoteRef = 1AC6FB4D180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libCocosDenshion Mac.a"; - remoteRef = 1AC6FB4F180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB52180E9ACB004C840B /* libjsbindings Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsbindings Mac.a"; - remoteRef = 1AC6FB51180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB54180E9ACB004C840B /* libluabindings Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libluabindings Mac.a"; - remoteRef = 1AC6FB53180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx iOS.a"; - remoteRef = 1AC6FB55180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx-extensions iOS.a"; - remoteRef = 1AC6FB57180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libchipmunk iOS.a"; - remoteRef = 1AC6FB59180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB5C180E9ACB004C840B /* libbox2d iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libbox2d iOS.a"; - remoteRef = 1AC6FB5B180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libCocosDenshion iOS.a"; - remoteRef = 1AC6FB5D180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB60180E9ACB004C840B /* libjsbindings iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsbindings iOS.a"; - remoteRef = 1AC6FB5F180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB62180E9ACB004C840B /* libluabindings iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libluabindings iOS.a"; - remoteRef = 1AC6FB61180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 509D4A9317EBB24E00697056 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 01A11FDD1887C43300ADD6C1 /* cocos2d-jsb.js in Resources */, - 15FD5C6B183A6170005CFF55 /* jsb_cocos2d_gui.js in Resources */, - 15FD5C6C183A6170005CFF55 /* jsb_cocos2d_studio.js in Resources */, - 1A67683E180E9CE90076BC67 /* jsb_chipmunk_constants.js in Resources */, - 1A67683F180E9CE90076BC67 /* jsb_chipmunk.js in Resources */, - 1A676840180E9CE90076BC67 /* jsb_cocos2d_constants.js in Resources */, - 1A676841180E9CE90076BC67 /* jsb_cocos2d_extension.js in Resources */, - 1A676842180E9CE90076BC67 /* jsb_cocos2d.js in Resources */, - 1A676843180E9CE90076BC67 /* jsb_cocosbuilder.js in Resources */, - 1A676844180E9CE90076BC67 /* jsb_debugger.js in Resources */, - 1A676845180E9CE90076BC67 /* jsb_deprecated.js in Resources */, - C03C8B4C18A770DD00723415 /* MainMenu.xib in Resources */, - 1A676846180E9CE90076BC67 /* jsb_opengl_constants.js in Resources */, - 1A676847180E9CE90076BC67 /* jsb_opengl.js in Resources */, - 1A676848180E9CE90076BC67 /* jsb_sys.js in Resources */, - 1A676849180E9CE90076BC67 /* jsb.js in Resources */, - 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */, - 1A6767FB180E9B160076BC67 /* debugger in Resources */, - 013F8DBF1887C10F008B7106 /* res in Resources */, - 013F8DC11887C10F008B7106 /* src in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A922753B1517C094001B78AA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 01A11FDC1887C40500ADD6C1 /* cocos2d-jsb.js in Resources */, - 15FD5C6F183A618A005CFF55 /* jsb_cocos2d_gui.js in Resources */, - 15FD5C70183A618A005CFF55 /* jsb_cocos2d_studio.js in Resources */, - 1A67684A180E9CF10076BC67 /* jsb_chipmunk_constants.js in Resources */, - 1A67684B180E9CF10076BC67 /* jsb_chipmunk.js in Resources */, - 1A67684C180E9CF10076BC67 /* jsb_cocos2d_constants.js in Resources */, - 1A67684D180E9CF10076BC67 /* jsb_cocos2d_extension.js in Resources */, - 1A67684E180E9CF10076BC67 /* jsb_cocos2d.js in Resources */, - 1A67684F180E9CF10076BC67 /* jsb_cocosbuilder.js in Resources */, - 1A676850180E9CF10076BC67 /* jsb_debugger.js in Resources */, - 1A676851180E9CF10076BC67 /* jsb_deprecated.js in Resources */, - 1A676852180E9CF10076BC67 /* jsb_opengl_constants.js in Resources */, - 1A676853180E9CF10076BC67 /* jsb_opengl.js in Resources */, - 1A676854180E9CF10076BC67 /* jsb_sys.js in Resources */, - 1A676855180E9CF10076BC67 /* jsb.js in Resources */, - 509D4ABE17EBB2AB00697056 /* Default.png in Resources */, - 5091731E17ECDF7A00D62437 /* Icon-80.png in Resources */, - 5091731F17ECDF7A00D62437 /* Icon-100.png in Resources */, - 509D4AC117EBB2AB00697056 /* Icon-72.png in Resources */, - 509D4AC017EBB2AB00697056 /* Icon-57.png in Resources */, - 5091731A17ECDF7A00D62437 /* Icon-29.png in Resources */, - 509D4AC617EBB2AB00697056 /* Icon-152.png in Resources */, - 509D4AC517EBB2AB00697056 /* Icon-144.png in Resources */, - 509D4AC317EBB2AB00697056 /* Icon-114.png in Resources */, - 509D4ABD17EBB2AB00697056 /* Default-568h@2x.png in Resources */, - 509D4ABF17EBB2AB00697056 /* Default@2x.png in Resources */, - 509D4AC217EBB2AB00697056 /* Icon-76.png in Resources */, - 5091731B17ECDF7A00D62437 /* Icon-40.png in Resources */, - 5091731C17ECDF7A00D62437 /* Icon-50.png in Resources */, - 509D4AC417EBB2AB00697056 /* Icon-120.png in Resources */, - 5091731D17ECDF7A00D62437 /* Icon-58.png in Resources */, - 1A6767FA180E9B160076BC67 /* debugger in Resources */, - 013F8DBE1887C10F008B7106 /* res in Resources */, - 013F8DC01887C10F008B7106 /* src in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 509D4A8017EBB24E00697056 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - C026DCC718928A1A00B3EDE8 /* Runtime.cpp in Sources */, - 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */, - C0C2F37418AA0C66003976DA /* SimulatorApp.mm in Sources */, - C026DCCA18928A2400B3EDE8 /* Runtime_ios-mac.mm in Sources */, - 013F8DBD1887C10F008B7106 /* cocos2d-jsb.js in Sources */, - C03C8B4B18A770DD00723415 /* main.m in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A92275391517C094001B78AA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */, - D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */, - 509D4AC817EBB2AB00697056 /* main.m in Sources */, - 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */, - C026DCC918928A2400B3EDE8 /* Runtime_ios-mac.mm in Sources */, - C026DCC618928A1A00B3EDE8 /* Runtime.cpp in Sources */, - 013F8DBC1887C10F008B7106 /* cocos2d-jsb.js in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1A676820180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx Mac"; - targetProxy = 1A67681F180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676822180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx-extensions Mac"; - targetProxy = 1A676821180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676824180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "chipmunk Mac"; - targetProxy = 1A676823180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676826180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "CocosDenshion Mac"; - targetProxy = 1A676825180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676828180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "jsbindings Mac"; - targetProxy = 1A676827180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A67682F180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx iOS"; - targetProxy = 1A67682E180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676831180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx-extensions iOS"; - targetProxy = 1A676830180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676833180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "chipmunk iOS"; - targetProxy = 1A676832180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676835180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "CocosDenshion iOS"; - targetProxy = 1A676834180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676837180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "jsbindings iOS"; - targetProxy = 1A676836180E9C110076BC67 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 509D4AA817EBB24E00697056 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = mac/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - GLFW_EXPOSE_NATIVE_COCOA, - GLFW_EXPOSE_NATIVE_NSGL, - CC_TARGET_OS_MAC, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/mac", - "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", - ); - INFOPLIST_FILE = mac/Info.plist; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = macosx; - }; - name = Debug; - }; - 509D4AA917EBB24E00697056 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = mac/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_MAC, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/mac", - "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", - ); - INFOPLIST_FILE = mac/Info.plist; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = macosx; - }; - name = Release; - }; - A92276FE1517C097001B78AA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - "COCOS2D_DEBUG=1", - USE_FILE32API, - COCOS2D_JAVASCRIPT, - CC_ENABLE_CHIPMUNK_INTEGRATION, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../cocos2d", - "$(SRCROOT)/../cocos2d/cocos", - "$(SRCROOT)/../cocos2d/cocos/base", - "$(SRCROOT)/../cocos2d/cocos/physics", - "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", - "$(SRCROOT)/../cocos2d/cocos/2d", - "$(SRCROOT)/../cocos2d/cocos/gui", - "$(SRCROOT)/../cocos2d/cocos/network", - "$(SRCROOT)/../cocos2d/cocos/audio/include", - "$(SRCROOT)/../cocos2d/cocos/editor-support", - "$(SRCROOT)/../cocos2d/cocos/scripting/javascript/bindings", - "$(SRCROOT)/../cocos2d/cocos/scripting/auto-generated/js-bindings", - "$(SRCROOT)/../cocos2d/extensions", - "$(SRCROOT)/../cocos2d/external", - "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", - ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - A92276FF1517C097001B78AA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = ( - NDEBUG, - USE_FILE32API, - COCOS2D_JAVASCRIPT, - CC_ENABLE_CHIPMUNK_INTEGRATION, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../cocos2d", - "$(SRCROOT)/../cocos2d/cocos", - "$(SRCROOT)/../cocos2d/cocos/base", - "$(SRCROOT)/../cocos2d/cocos/physics", - "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", - "$(SRCROOT)/../cocos2d/cocos/2d", - "$(SRCROOT)/../cocos2d/cocos/gui", - "$(SRCROOT)/../cocos2d/cocos/network", - "$(SRCROOT)/../cocos2d/cocos/audio/include", - "$(SRCROOT)/../cocos2d/cocos/editor-support", - "$(SRCROOT)/../cocos2d/cocos/scripting/javascript/bindings", - "$(SRCROOT)/../cocos2d/cocos/scripting/auto-generated/js-bindings", - "$(SRCROOT)/../cocos2d/extensions", - "$(SRCROOT)/../cocos2d/external", - "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", - ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A92277011517C097001B78AA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COMPRESS_PNG_FILES = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_IPHONE, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/ios", - ); - INFOPLIST_FILE = ios/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - A92277021517C097001B78AA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COMPRESS_PNG_FILES = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_IPHONE, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/ios", - ); - INFOPLIST_FILE = ios/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 509D4AA817EBB24E00697056 /* Debug */, - 509D4AA917EBB24E00697056 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A92275371517C094001B78AA /* Build configuration list for PBXProject "HelloJavascript" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A92276FE1517C097001B78AA /* Debug */, - A92276FF1517C097001B78AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A92277011517C097001B78AA /* Debug */, - A92277021517C097001B78AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A92275341517C094001B78AA /* Project object */; -} diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm deleted file mode 100644 index d9cabea983..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/Runtime_ios-mac.mm +++ /dev/null @@ -1,28 +0,0 @@ - -#include -#include -using namespace std; - -string getProjSearchPath() -{ - NSString *bundlePath = [[NSBundle mainBundle] resourcePath]; - if (bundlePath != nil) { - return [bundlePath UTF8String]; - } - return ""; -} - -vector getSearchPath() -{ - vector searchPathArray; - return searchPathArray; -} - -string getDotWaitFilePath() -{ - string dotwaitFile; - dotwaitFile = getProjSearchPath(); - dotwaitFile += "/.wait"; - return dotwaitFile; -} - diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h deleted file mode 100644 index 2e8186124e..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.h +++ /dev/null @@ -1,35 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -@class RootViewController; - -@interface AppController : NSObject -{ - UIWindow *window; - RootViewController *viewController; -} - -@end - diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm deleted file mode 100644 index c833c036f8..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/AppController.mm +++ /dev/null @@ -1,146 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -#import -#import "cocos2d.h" - -#import "AppController.h" -#import "AppDelegate.h" -#import "RootViewController.h" -#import "CCEAGLView.h" - -@implementation AppController - -#pragma mark - -#pragma mark Application lifecycle - -// cocos2d application instance -static AppDelegate s_sharedApplication; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions -{ - - // Override point for customization after application launch. - - // Add the view controller's view to the window and display. - window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] - pixelFormat: kEAGLColorFormatRGBA8 - depthFormat: GL_DEPTH24_STENCIL8_OES - preserveBackbuffer: NO - sharegroup: nil - multiSampling: NO - numberOfSamples: 0 ]; - - [eaglView setMultipleTouchEnabled:YES]; - - // Use RootViewController manage CCEAGLView - viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; - viewController.wantsFullScreenLayout = YES; - viewController.view = eaglView; - - // Set RootViewController to window - if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) - { - // warning: addSubView doesn't work on iOS6 - [window addSubview: viewController.view]; - } - else - { - // use this method on ios6 - [window setRootViewController:viewController]; - } - - [window makeKeyAndVisible]; - - [[UIApplication sharedApplication] setStatusBarHidden: YES]; - - // IMPORTANT: Setting the GLView should be done after creating the RootViewController - cocos2d::GLView *glview = cocos2d::GLView::createWithEAGLView(eaglView); - cocos2d::Director::getInstance()->setOpenGLView(glview); - - cocos2d::Application::getInstance()->run(); - return YES; -} - - -- (void)applicationWillResignActive:(UIApplication *)application { - /* - Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - */ - //We don't need to call this method any more. It will interupt user defined game pause&resume logic - /* cocos2d::Director::getInstance()->pause(); */ -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - /* - Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - */ - //We don't need to call this method any more. It will interupt user defined game pause&resume logic - /* cocos2d::Director::getInstance()->resume(); */ -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - If your application supports background execution, called instead of applicationWillTerminate: when the user quits. - */ - cocos2d::Application::getInstance()->applicationDidEnterBackground(); -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - /* - Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. - */ - cocos2d::Application::getInstance()->applicationWillEnterForeground(); -} - -- (void)applicationWillTerminate:(UIApplication *)application { - /* - Called when the application is about to terminate. - See also applicationDidEnterBackground:. - */ -} - - -#pragma mark - -#pragma mark Memory management - -- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { - /* - Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. - */ - cocos2d::Director::getInstance()->purgeCachedData(); -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end - diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id deleted file mode 100644 index 8f5838f3a8..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -66c6d1cead373b45218424f6a82f370897e443e4 \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id deleted file mode 100644 index 8843505b20..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -84689888a14a2123d2b39f7f2f61be8c15207479 \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch deleted file mode 100644 index 168ddec406..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'HelloJavascript' target in the 'HelloJavascript' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h deleted file mode 100644 index 11dfc4bf88..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.h +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2011 cocos2d-x.org - Copyright (c) 2010 Ricardo Quesada - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#import - - -@interface RootViewController : UIViewController { - -} -- (BOOL)prefersStatusBarHidden; -@end diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm deleted file mode 100644 index dfbe298774..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/RootViewController.mm +++ /dev/null @@ -1,105 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2011 cocos2d-x.org - Copyright (c) 2010 Ricardo Quesada - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#import "RootViewController.h" -#import "cocos2d.h" -#import "CCEAGLView.h" - -@implementation RootViewController - -/* - // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { - // Custom initialization - } - return self; -} -*/ - -/* -// Implement loadView to create a view hierarchy programmatically, without using a nib. -- (void)loadView { -} -*/ - -/* -// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. -- (void)viewDidLoad { - [super viewDidLoad]; -} - -*/ -// Override to allow orientations other than the default portrait orientation. -// This method is deprecated on ios6 -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return UIInterfaceOrientationIsLandscape( interfaceOrientation ); -} - -// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead -- (NSUInteger) supportedInterfaceOrientations{ -#ifdef __IPHONE_6_0 - return UIInterfaceOrientationMaskAllButUpsideDown; -#endif -} - -- (BOOL) shouldAutorotate { - return YES; -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - - CGSize s = CGSizeMake([[CCEAGLView sharedEGLView] getWidth], [[CCEAGLView sharedEGLView] getHeight]); - - cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); -} - -//fix not hide status on ios7 -- (BOOL)prefersStatusBarHidden -{ - return YES; -} - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m b/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m deleted file mode 100644 index b1286e31be..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/ios/main.m +++ /dev/null @@ -1,11 +0,0 @@ - - -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); - [pool release]; - return retVal; -} diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id deleted file mode 100644 index 0c90afdb6d..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Icon.icns.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -2040fc6fe624353ae1d3db50cd3d450f4fda5afc \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib deleted file mode 100644 index ded673e061..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/MainMenu.xib +++ /dev/null @@ -1,140 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch deleted file mode 100644 index 46c36a7e99..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h deleted file mode 100644 index 94bd6040d8..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.h +++ /dev/null @@ -1,50 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - - -#include -#include "AppDelegate.h" - -@interface AppController : NSObject -{ - NSWindow *window; - NSMenu *menu; - NSFileHandle *fileHandle; - //console pipe - NSPipe *pipe; - NSFileHandle *pipeReadHandle; -} - -@property (nonatomic, assign) IBOutlet NSMenu* menu; - - - -- (IBAction) onFileClose:(id)sender; -- (IBAction) onScreenPortait:(id)sender; -- (IBAction) onScreenLandscape:(id)sender; -- (IBAction) onScreenZoomOut:(id)sender; -- (IBAction) onReloadScript:(id)sender; - - -@end diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm deleted file mode 100644 index 7db1a7cb81..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/SimulatorApp.mm +++ /dev/null @@ -1,271 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#import "SimulatorApp.h" - - -#include -#include -#include -#include -#include - -#include "AppDelegate.h" -#include "glfw3.h" -#include "glfw3native.h" -#include "Runtime.h" - -#include "cocos2d.h" - -using namespace cocos2d; - -bool g_landscape=false; -CCSize g_screenSize; -GLView* g_eglView=NULL; - -using namespace std; -using namespace cocos2d; - -@implementation AppController - -@synthesize menu; - --(void) dealloc -{ - CCDirector::sharedDirector()->end(); - [super dealloc]; -} - -#pragma mark - -#pragma delegates - -- (void) applicationDidFinishLaunching:(NSNotification *)aNotification -{ - - AppDelegate app; - [self createSimulator:[NSString stringWithUTF8String:"HelloJavascript"] viewWidth:960 viewHeight:640 factor:1.0]; - int ret = Application::getInstance()->run(); - -} - - -#pragma mark - -#pragma mark functions - -- (void) createSimulator:(NSString*)viewName viewWidth:(float)width viewHeight:(float)height factor:(float)frameZoomFactor -{ - if (g_eglView) - { - return; - } - - g_eglView = GLView::createWithRect([viewName cStringUsingEncoding:NSUTF8StringEncoding],cocos2d::Rect(0.0f,0.0f,width,height),frameZoomFactor); - auto director = Director::getInstance(); - director->setOpenGLView(g_eglView); - g_landscape = false; - g_screenSize.width = width; - g_screenSize.height = height; - if (width > height) - { - g_landscape = true; - } - - window = glfwGetCocoaWindow(g_eglView->getWindow()); - window.delegate = self; - [NSApp setDelegate: self]; - - [self createViewMenu]; - [self updateMenu]; - [window center]; - - [window becomeFirstResponder]; - [window makeKeyAndOrderFront:self]; - [window setAcceptsMouseMovedEvents:NO]; -} - - -- (void) createViewMenu -{ - - NSMenu *submenu = [[[window menu] itemWithTitle:@"View"] submenu]; - - for (int i = SimulatorConfig::getInstance()->getScreenSizeCount() - 1; i >= 0; --i) - { - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - NSMenuItem *item = [[[NSMenuItem alloc] initWithTitle:[NSString stringWithCString:size.title.c_str() encoding:NSUTF8StringEncoding] - action:@selector(onViewChangeFrameSize:) - keyEquivalent:@""] autorelease]; - [item setTag:i]; - [submenu insertItem:item atIndex:0]; - } -} - - -- (void) updateMenu -{ - - NSMenu *menuScreen = [[[window menu] itemWithTitle:@"View"] submenu]; - NSMenuItem *itemPortait = [menuScreen itemWithTitle:@"Portait"]; - NSMenuItem *itemLandscape = [menuScreen itemWithTitle:@"Landscape"]; - if (g_landscape) - { - [itemPortait setState:NSOffState]; - [itemLandscape setState:NSOnState]; - } - else - { - [itemPortait setState:NSOnState]; - [itemLandscape setState:NSOffState]; - } - - int scale = 100; - - NSMenuItem *itemZoom100 = [menuScreen itemWithTitle:@"Actual (100%)"]; - NSMenuItem *itemZoom75 = [menuScreen itemWithTitle:@"Zoom Out (75%)"]; - NSMenuItem *itemZoom50 = [menuScreen itemWithTitle:@"Zoom Out (50%)"]; - NSMenuItem *itemZoom25 = [menuScreen itemWithTitle:@"Zoom Out (25%)"]; - [itemZoom100 setState:NSOffState]; - [itemZoom75 setState:NSOffState]; - [itemZoom50 setState:NSOffState]; - [itemZoom25 setState:NSOffState]; - if (scale == 100) - { - [itemZoom100 setState:NSOnState]; - } - else if (scale == 75) - { - [itemZoom75 setState:NSOnState]; - } - else if (scale == 50) - { - [itemZoom50 setState:NSOnState]; - } - else if (scale == 25) - { - [itemZoom25 setState:NSOnState]; - } - - int width = g_screenSize.width; - int height = g_screenSize.height; - if (height > width) - { - int w = width; - width = height; - height = w; - } - - int count = SimulatorConfig::getInstance()->getScreenSizeCount(); - for (int i = 0; i < count; ++i) - { - bool bSel = false; - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - if (size.width == width && size.height == height) - { - bSel = true; - } - NSMenuItem *itemView = [menuScreen itemWithTitle:[NSString stringWithUTF8String:size.title.c_str()]]; - [itemView setState:(bSel? NSOnState : NSOffState)]; - } - - - //[window setTitle:[NSString stringWithFormat:@"quick-x-player (%0.0f%%)", projectConfig.getFrameScale() * 100]]; -} - - -- (void) updateView -{ - if (g_landscape) - { - glfwSetWindowSize(g_eglView->getWindow(),g_screenSize.width,g_screenSize.height); - } - else - { - glfwSetWindowSize(g_eglView->getWindow(),g_screenSize.height,g_screenSize.width); - } - [self updateMenu]; -} - -- (BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication -{ - return YES; -} - -- (BOOL) applicationShouldHandleReopen:(NSApplication *)sender hasVisibleWindows:(BOOL)flag -{ - return NO; -} - -- (void) windowWillClose:(NSNotification *)notification -{ - [[NSRunningApplication currentApplication] terminate]; -} - - -- (IBAction) onFileClose:(id)sender -{ - [[NSApplication sharedApplication] terminate:self]; -} - - -- (IBAction) onScreenPortait:(id)sender -{ - g_landscape = false; - [self updateView]; - -} - -- (IBAction) onScreenLandscape:(id)sender -{ - g_landscape = true; - [self updateView]; -} - -- (IBAction) onReloadScript:(id)sender -{ - reloadScript(); -} - - -- (IBAction) onViewChangeFrameSize:(id)sender -{ - NSInteger index = [sender tag]; - if (index >= 0 && index < SimulatorConfig::getInstance()->getScreenSizeCount()) - { - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index); - g_screenSize.width = size.width; - g_screenSize.height = size.height; - [self updateView]; - } -} - - -- (IBAction) onScreenZoomOut:(id)sender -{ - if ([sender state] == NSOnState) return; - float scale = (float)[sender tag] / 100.0f; - [self setZoom:scale]; -} - - -@end diff --git a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m b/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m deleted file mode 100644 index 658f0c14ee..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.ios_mac/mac/main.m +++ /dev/null @@ -1,7 +0,0 @@ - -#import - -int main(int argc, char *argv[]) -{ - return NSApplicationMain(argc, (const char **)argv); -} diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln deleted file mode 100644 index 895951dd71..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.sln +++ /dev/null @@ -1,110 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloJavascript", "HelloJavascript.vcxproj", "{3B0B58B1-2734-488E-A542-ECEC11EB2455}" - ProjectSection(ProjectDependencies) = postProject - {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} - {B57CF53F-2E49-4031-9822-047CC0E6BDE2} = {B57CF53F-2E49-4031-9822-047CC0E6BDE2} - {39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD} - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB} = {811C0DAB-7B96-4BD3-A154-B7572B58E4AB} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" - ProjectSection(ProjectDependencies) = postProject - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\cocos2d\cocos\scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" - ProjectSection(ProjectDependencies) = postProject - {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\cocos2d\cocos\scripting\javascript\bindings\chipmunk\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos2d\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\cocos2d\cocos\scripting\javascript\bindings\localstorage\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\cocos2d\cocos\scripting\javascript\bindings\extension\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos2d\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForBuilder", "..\cocos2d\cocos\scripting\javascript\bindings\cocosbuilder\libJSBindingForBuilder.vcxproj", "{F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Debug|Win32.Build.0 = Debug|Win32 - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Release|Win32.ActiveCfg = Release|Win32 - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Release|Win32.Build.0 = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.ActiveCfg = Debug|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.Build.0 = Debug|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.ActiveCfg = Release|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.Build.0 = Release|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.ActiveCfg = Debug|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.Build.0 = Debug|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.ActiveCfg = Release|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.Build.0 = Release|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.ActiveCfg = Debug|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.Build.0 = Debug|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.ActiveCfg = Release|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.Build.0 = Release|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.ActiveCfg = Debug|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.Build.0 = Debug|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.ActiveCfg = Release|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.Build.0 = Release|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.Build.0 = Debug|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.ActiveCfg = Release|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.Build.0 = Release|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32 - {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Debug|Win32.ActiveCfg = Debug|Win32 - {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Debug|Win32.Build.0 = Debug|Win32 - {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Release|Win32.ActiveCfg = Release|Win32 - {F9DA0FC1-651B-457B-962E-A4D61CEBF5FD}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj deleted file mode 100644 index 9fa7d9e96f..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj +++ /dev/null @@ -1,238 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {3B0B58B1-2734-488E-A542-ECEC11EB2455} - HelloJavascript - - - - Application - Unicode - v100 - v110 - v110_xp - - - Application - Unicode - v100 - v110 - v110_xp - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)..\..\runtime\HelloJavascript\win32\ - $(Configuration).win32\ - false - $(SolutionDir)..\..\runtime\HelloJavascript\win32\ - $(Configuration).win32\ - false - AllRules.ruleset - - - AllRules.ruleset - - - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - - _DEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)game.tlb - game.h - - - game_i.c - game_p.c - - - Disabled - $(ProjectDir)..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\javascript\bindings;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;DEBUG;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4267;4251;4244;4800;%(DisableSpecificWarnings) - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - - - if not exist "$(OutDir)" mkdir "$(Configuration).win32" -xcopy /Y /Q "$(EngineRoot)external\spidermonkey\prebuilt\win32\*.*" "$(Configuration).win32" -xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(Configuration).win32" -xcopy /Y /Q "$(Configuration).win32\*.dll" "$(OutDir)" - - - libcurl_imp.lib;mozjs-27.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies) - $(Configuration).win32;%(AdditionalLibraryDirectories) - true - Windows - MachineX86 - $(Configuration).win32$(TargetName).pdb - $(OutDir)$(TargetName)$(TargetExt) - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -if exist "$(OutDir)\Resources" rd /s /q "$(OutDir)\Resources" -mkdir "$(OutDir)\Resources" -xcopy "$(EngineRoot)cocos\scripting\javascript\script\*.js" "$(OutDir)\Resources\" /e /Y - - - Copy js and resource files. - - - - - NDEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)game.tlb - game.h - - - game_i.c - game_p.c - - - $(ProjectDir)..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\editor-support;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\javascript\bindings;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;GLFW_EXPOSE_NATIVE_WIN32;GLFW_EXPOSE_NATIVE_WGL;%(PreprocessorDefinitions) - - - MultiThreadedDLL - - - Level3 - - - 4267;4251;4244;4800;%(DisableSpecificWarnings) - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - - - if not exist "$(OutDir)" mkdir "$(Configuration).win32" -xcopy /Y /Q "$(EngineRoot)external\spidermonkey\prebuilt\win32\*.*" "$(Configuration).win32" -xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(Configuration).win32" - - - libcurl_imp.lib;mozjs-27.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies) - $(Configuration).win32;%(AdditionalLibraryDirectories) - Windows - MachineX86 - true - $(Configuration).win32$(TargetName).pdb - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -if exist "$(OutDir)\Resources" rd /s /q "$(OutDir)\Resources" -mkdir "$(OutDir)\Resources" -xcopy "$(EngineRoot)cocos\scripting\javascript\script\*.js" "$(OutDir)\Resources\" /e /Y - Copy js and resource files. - - - - - - - - - - - - - - - - - - - - - - {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - - - {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - - - {811c0dab-7b96-4bd3-a154-b7572b58e4ab} - - - {b57cf53f-2e49-4031-9822-047cc0e6bde2} - - - {21070e58-eec6-4e16-8b4f-6d083df55790} - - - {f9da0fc1-651b-457b-962e-a4d61cebf5fd} - - - {625f7391-9a91-48a1-8cfc-79508c822637} - - - {68f5f371-bd7b-4c30-ae5b-0b08f22e0cde} - - - {39379840-825a-45a0-b363-c09ffef864bd} - - - {632a8f38-d0f0-4d22-86b3-d69f5e6bf63a} - - - {21b2c324-891f-48ea-ad1a-5ae13de12e28} - - - {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} - - - - - - - - - \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters deleted file mode 100644 index a3173413e6..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.filters +++ /dev/null @@ -1,57 +0,0 @@ - - - - - {ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest - - - {ccb2323b-1cfa-41ea-bcf4-ba5f07309396} - - - {e93a77e1-af1e-4400-87d3-504b62ebdbb0} - - - - - win32 - - - Classes - - - win32 - - - Classes - - - win32 - - - - - Classes - - - win32 - - - - win32 - - - Classes - - - - - resource - - - - - resource - - - \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user b/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user deleted file mode 100644 index bc2c507e26..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/HelloJavascript.vcxproj.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - $(OutDir) - WindowsLocalDebugger - - - $(OutDir) - WindowsLocalDebugger - - \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp b/templates/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp deleted file mode 100644 index 13fce8684e..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/Runtime_win32.cpp +++ /dev/null @@ -1,119 +0,0 @@ - -#include "Runtime.h" - -#include -#include -#include -#include -#include - -using namespace std; - -bool browseDir(const char *dir,const char *filespec,vector &filterArray,vector &fileList) -{ - if (chdir(dir) != 0) - { - return false; - } - - long hFile; - _finddata_t fileinfo; - if ((hFile=_findfirst(filespec,&fileinfo)) != -1) - { - do - { - if ((fileinfo.attrib & _A_SUBDIR)) - { - continue; - } - - char *pszexten=strrchr(fileinfo.name,'.'); - char szextension[_MAX_PATH_]={0}; - if (pszexten) - { - strcpy(szextension,"*"); - strcat(szextension,pszexten); - if (find(filterArray.begin(),filterArray.end(),szextension) != filterArray.end()) - { - continue; - } - } - - strcpy(szextension,fileinfo.name); - if (find(filterArray.begin(),filterArray.end(),szextension) != filterArray.end()) - { - continue; - } - - char fullFileName[_MAX_PATH_] ={0}; - sprintf(fullFileName,"%s%s",dir,fileinfo.name); - fileList.push_back(fullFileName); - } while (_findnext(hFile,&fileinfo) == 0); - _findclose(hFile); - } - - if (chdir(dir) != 0) - { - return false; - } - - if ((hFile=_findfirst("*.*",&fileinfo)) != -1) - { - do - { - if(!(fileinfo.attrib & _A_SUBDIR)) - { - continue; - } - - if (strcmp(fileinfo.name,".") == 0 || strcmp(fileinfo.name,"..") == 0) - { - continue; - } - - if (find(filterArray.begin(),filterArray.end(),fileinfo.name) != filterArray.end()) - { - continue; - } - - char subdir[_MAX_PATH_]={0}; - sprintf(subdir,"%s%s/",dir,fileinfo.name); - if (!browseDir(subdir,filespec,filterArray,fileList)) - { - _findclose(hFile); - return false; - } - } while (_findnext(hFile,&fileinfo) == 0); - _findclose(hFile); - } - return true; -} - -string getProjSearchPath() -{ - extern std::string getCurAppPath(void); - string searchPath = getCurAppPath(); - searchPath += "/../../.."; - char fuldir[_MAX_PATH_]={0}; - _fullpath(fuldir,searchPath.c_str(),_MAX_PATH_); - return fuldir; -} - -vector getSearchPath() -{ - extern std::string getCurAppPath(void); - vector searchPathArray; - string searchPathRes = getCurAppPath(); - searchPathRes += "/Resources"; - searchPathArray.push_back(getProjSearchPath()); - searchPathArray.push_back(searchPathRes); - return searchPathArray; -} - -string getDotWaitFilePath() -{ - extern std::string getCurAppPath(void); - string dotwaitFile = getCurAppPath(); - dotwaitFile += "/.wait"; - return dotwaitFile; -} diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp b/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp deleted file mode 100644 index f0f8bc9070..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#include "SimulatorWindow.h" - -#include "cocos2d.h" -#include "glfw3native.h" -#include "resource.h" -#include "Runtime.h" - -#include -#include -using namespace std; -using namespace cocos2d; - - -WNDPROC g_oldProc=NULL; -bool g_landscape=false; -CCSize g_screenSize; -GLView* g_eglView=NULL; -INT_PTR CALLBACK AboutDialogCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam); - - -void createViewMenu() -{ - HMENU menu = GetMenu(glfwGetWin32Window(g_eglView->getWindow())); - HMENU viewMenu = GetSubMenu(menu, 1); - - for (int i = SimulatorConfig::getInstance()->getScreenSizeCount() - 1; i >= 0; --i) - { - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - wstring menuName; - menuName.assign(size.title.begin(), size.title.end()); - - MENUITEMINFO item; - ZeroMemory(&item, sizeof(item)); - item.cbSize = sizeof(item); - item.fMask = MIIM_FTYPE | MIIM_ID | MIIM_STRING; - item.fType = MFT_STRING; - item.wID = ID_VIEW_SIZE + i; - item.dwTypeData = (LPTSTR)menuName.c_str(); - item.cch = menuName.length(); - - InsertMenuItem(viewMenu, 0, TRUE, &item); - } -} - -void updateMenu() -{ - HMENU menu = GetMenu(glfwGetWin32Window(g_eglView->getWindow())); - HMENU viewMenu = GetSubMenu(menu, 1); - - if (g_landscape) - { - CheckMenuItem(viewMenu, ID_VIEW_PORTRAIT, MF_BYCOMMAND | MF_UNCHECKED); - CheckMenuItem(viewMenu, ID_VIEW_LANDSCAPE, MF_BYCOMMAND | MF_CHECKED); - } - else - { - CheckMenuItem(viewMenu, ID_VIEW_PORTRAIT, MF_BYCOMMAND | MF_CHECKED); - CheckMenuItem(viewMenu, ID_VIEW_LANDSCAPE, MF_BYCOMMAND | MF_UNCHECKED); - } - - int width = g_screenSize.width; - int height = g_screenSize.height; - if (height > width) - { - int w = width; - width = height; - height = w; - } - - int count = SimulatorConfig::getInstance()->getScreenSizeCount(); - for (int i = 0; i < count; ++i) - { - bool bSel = false; - - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(i); - if (size.width == width && size.height == height) - { - bSel = true; - } - CheckMenuItem(viewMenu, i, MF_BYPOSITION | (bSel? MF_CHECKED : MF_UNCHECKED)); - } -} - -/*@brief updateView*/ -void updateView() -{ - if (g_landscape) - { - glfwSetWindowSize(g_eglView->getWindow(),g_screenSize.width,g_screenSize.height); - } - else - { - glfwSetWindowSize(g_eglView->getWindow(),g_screenSize.height,g_screenSize.width); - } - updateMenu(); -} - -void onViewChangeOrientation(int viewMenuID) -{ - if (viewMenuID == ID_VIEW_PORTRAIT && g_landscape) - { - g_landscape = false; - updateView(); - } - else if (viewMenuID == ID_VIEW_LANDSCAPE && !g_landscape) - { - g_landscape = true; - updateView(); - } -} - -void onViewChangeFrameSize(int viewMenuID) -{ - int index = viewMenuID - ID_VIEW_SIZE; - if (index >= 0 && index < SimulatorConfig::getInstance()->getScreenSizeCount()) - { - SimulatorScreenSize size = SimulatorConfig::getInstance()->getScreenSize(index); - g_screenSize.width = size.width; - g_screenSize.height = size.height; - updateView(); - } -} - -void onHelpAbout() -{ - DialogBox(GetModuleHandle(NULL), MAKEINTRESOURCE(IDD_DIALOG_ABOUT), glfwGetWin32Window(g_eglView->getWindow()), AboutDialogCallback); -} - -/*@brief new windows process*/ -LRESULT CALLBACK SNewWndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) -{ - int wmId, wmEvent; - switch (message) - { - case WM_COMMAND: - { - wmId = LOWORD(wParam); - wmEvent = HIWORD(wParam); - - switch (wmId) - { - case ID_FILE_EXIT: - exit(0); - break; - - case ID_VIEW_PORTRAIT: - case ID_VIEW_LANDSCAPE: - onViewChangeOrientation(wmId); - break; - - case ID_CONTROL_RELOAD: - reloadScript(); - break; - - case ID_HELP_ABOUT: - onHelpAbout(); - - default: - if (wmId >= ID_VIEW_SIZE && wmId <= ID_VIEW_SIZE + SimulatorConfig::getInstance()->getScreenSizeCount() - 1) - { - onViewChangeFrameSize(wmId); - break; - } - return 0; - } - } - break; - } - return g_oldProc(hWnd, message, wParam, lParam); -} - -/*@brief AboutDialog Callback*/ -INT_PTR CALLBACK AboutDialogCallback(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) -{ - UNREFERENCED_PARAMETER(lParam); - switch (message) - { - case WM_INITDIALOG: - return (INT_PTR)TRUE; - - case WM_COMMAND: - if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL) - { - EndDialog(hDlg, LOWORD(wParam)); - return (INT_PTR)TRUE; - } - break; - } - return (INT_PTR)FALSE; -} - -void createSimulator(const char* viewName, float width, float height, float frameZoomFactor) -{ - if (g_eglView) - { - return; - } - - g_eglView = GLView::createWithRect(viewName,Rect(0,0,width,height),frameZoomFactor); - auto director = Director::getInstance(); - director->setOpenGLView(g_eglView); - g_landscape = false; - g_screenSize.width = width; - g_screenSize.height = height; - if (width > height) - { - g_landscape = true; - } - - HWND hWnd=glfwGetWin32Window(g_eglView->getWindow()); - HMENU hMenu = LoadMenu(GetModuleHandle(NULL), MAKEINTRESOURCE(IDR_MENU_COCOS)); - SetMenu(hWnd, hMenu); - createViewMenu(); - updateMenu(); - - g_oldProc = (WNDPROC)SetWindowLong(hWnd, GWL_WNDPROC, (LONG)SNewWndProc); - if (g_oldProc==0) - { - printf("SetWindowLong NewWndProc Error:%d\n",GetLastError()); - } - -} \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h b/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h deleted file mode 100644 index fb09f1646d..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/SimulatorWindow.h +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** -Copyright (c) 2013 cocos2d-x.org - -http://www.cocos2d-x.org - -Permission is hereby granted, free of charge, to any person obtaining a copy -of this software and associated documentation files (the "Software"), to deal -in the Software without restriction, including without limitation the rights -to use, copy, modify, merge, publish, distribute, sublicense, and/or sell -copies of the Software, and to permit persons to whom the Software is -furnished to do so, subject to the following conditions: - -The above copyright notice and this permission notice shall be included in -all copies or substantial portions of the Software. - -THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR -IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, -FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE -AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER -LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, -OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN -THE SOFTWARE. -****************************************************************************/ - -#ifndef __SIMULATOR_WINDOW_H_ -#define __SIMULATOR_WINDOW_H_ - -/************************ -@brief create Simulator -*********************************/ -void createSimulator(const char* viewName, float width, float height,float frameZoomFactor = 1.0f); - -#endif /* __PROJECT_CONFIG_H_ */ diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/game.rc b/templates/multi-platform-js-runtime/framework/proj.win32/game.rc deleted file mode 100644 index 940b5e7256..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/game.rc +++ /dev/null @@ -1,213 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#include "afxres.h" - -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// Chinese (Simplified, PRC) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_CHS) -LANGUAGE LANG_CHINESE, SUBLANG_CHINESE_SIMPLIFIED -#pragma code_page(936) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -2 TEXTINCLUDE -BEGIN - "#include ""afxres.h""\r\n" - "\0" -END - -3 TEXTINCLUDE -BEGIN - "\r\n" - "\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Menu -// - -IDR_MENU_COCOS MENU -BEGIN - POPUP "&File" - BEGIN - MENUITEM SEPARATOR - MENUITEM "E&xit", ID_FILE_EXIT - END - POPUP "&View" - BEGIN - MENUITEM SEPARATOR - MENUITEM "&Portrait", ID_VIEW_PORTRAIT - MENUITEM "&Landscape", ID_VIEW_LANDSCAPE - MENUITEM SEPARATOR - MENUITEM "&Custom", ID_VIEW_CUSTOM - END - POPUP "&Control" - BEGIN - MENUITEM "Reload", ID_CONTROL_RELOAD - END - POPUP "&Help" - BEGIN - MENUITEM "&About ...", ID_HELP_ABOUT - END -END - - -///////////////////////////////////////////////////////////////////////////// -// -// Dialog -// - -IDD_DIALOG_ABOUT DIALOGEX 0, 0, 243, 94 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "About Simulator" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,173,69,63,18 - LTEXT "Cocos2d-x-Simulator",IDC_STATIC,29,17,169,25 -END - -IDD_DIALOG_VIEWCUSTOM DIALOGEX 0, 0, 179, 98 -STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU -CAPTION "Custom" -FONT 8, "MS Shell Dlg", 400, 0, 0x1 -BEGIN - DEFPUSHBUTTON "OK",IDOK,47,77,50,14 - PUSHBUTTON "Cancel",IDCANCEL,104,77,50,14 - LTEXT "Width£º",IDC_STATIC,15,14,30,8 - LTEXT "Height£º",IDC_STATIC,15,36,36,12 - EDITTEXT IDC_EDIT_WIDTH,60,15,89,14,ES_AUTOHSCROLL - EDITTEXT IDC_EDIT_HEIGHT,62,36,87,14,ES_AUTOHSCROLL -END - - -///////////////////////////////////////////////////////////////////////////// -// -// DESIGNINFO -// - -#ifdef APSTUDIO_INVOKED -GUIDELINES DESIGNINFO -BEGIN - IDD_DIALOG_ABOUT, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 236 - TOPMARGIN, 7 - BOTTOMMARGIN, 87 - END - - IDD_DIALOG_VIEWCUSTOM, DIALOG - BEGIN - LEFTMARGIN, 7 - RIGHTMARGIN, 172 - TOPMARGIN, 7 - BOTTOMMARGIN, 91 - END -END -#endif // APSTUDIO_INVOKED - -#endif // Chinese (Simplified, PRC) resources -///////////////////////////////////////////////////////////////////////////// - - -///////////////////////////////////////////////////////////////////////////// -// English (United States) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -#endif // APSTUDIO_INVOKED - - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -GLFW_ICON ICON "res\\game.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "FileDescription", "game Module" - VALUE "FileVersion", "1, 0, 0, 1" - VALUE "InternalName", "game" - VALUE "LegalCopyright", "Copyright " - VALUE "OriginalFilename", "game.exe" - VALUE "ProductName", "game Module" - VALUE "ProductVersion", "1, 0, 0, 1" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x409, 1200 - END -END - -#endif // English (United States) resources -///////////////////////////////////////////////////////////////////////////// - - - -#ifndef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 3 resource. -// - - -///////////////////////////////////////////////////////////////////////////// -#endif // not APSTUDIO_INVOKED - diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/main.cpp b/templates/multi-platform-js-runtime/framework/proj.win32/main.cpp deleted file mode 100644 index 156f155906..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/main.cpp +++ /dev/null @@ -1,59 +0,0 @@ -#include "main.h" -#include "AppDelegate.h" -#include "SimulatorWindow.h" - -USING_NS_CC; - -// uncomment below line, open debug console -// #define USE_WIN32_CONSOLE - -int APIENTRY _tWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, - int nCmdShow) -{ - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - -#ifdef USE_WIN32_CONSOLE - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); -#endif - - // create the application instance - AppDelegate app; - createSimulator("HelloJavascript",960,640); - int ret = Application::getInstance()->run(); - -#ifdef USE_WIN32_CONSOLE - FreeConsole(); -#endif - - return ret; -} - -std::string getCurAppPath(void) -{ - TCHAR szAppDir[MAX_PATH]={0}; - if (!GetModuleFileName(NULL,szAppDir,MAX_PATH)) - return ""; - - int nEnd=0; - for (int i=0;szAppDir[i];i++) - { - if(szAppDir[i]=='\\') - nEnd = i; - } - szAppDir[nEnd] = 0; - int iLen = 2*wcslen(szAppDir); - char* chRtn = new char[iLen+1]; - wcstombs(chRtn,szAppDir,iLen+1); - std::string strPath = chRtn; - delete [] chRtn; - chRtn=NULL; - char fuldir[MAX_PATH]={0}; - _fullpath(fuldir,strPath.c_str(),MAX_PATH); - return fuldir; -} \ No newline at end of file diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/main.h b/templates/multi-platform-js-runtime/framework/proj.win32/main.h deleted file mode 100644 index e29aeedb3a..0000000000 --- a/templates/multi-platform-js-runtime/framework/proj.win32/main.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __MAIN_H__ -#define __MAIN_H__ - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -// Windows Header Files: -#include - -// C RunTime Header Files -#include "CCStdC.h" - -#endif // __WINMAIN_H__ diff --git a/templates/multi-platform-js-runtime/framework/proj.win32/res/game.ico b/templates/multi-platform-js-runtime/framework/proj.win32/res/game.ico deleted file mode 100644 index feaf932a7465e435af6271bd8204c0145731a6eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47629 zcmeHw2Ut~C_C2VmbW{*T6tMvI-cS^5*boF23l{9X7erK4RIJ#0@4ZH&F|j4F#B>vr zXks*zOomCAk(tS4`u?wV?mO>Ynu?N{`Tf7)`wsWLTh6XKz=;E-cIr zf0gWl+t}F!;#03)#`mi;?CiSXTrj?dA*CSM<39D5VjS}OKRV3LWoAUl(3zc_(`R*Y z{vf%FOUA6Ou1^Y_y5Jd8O2X&oP09GZ*-@@f=Eb-^nIG%+WI<22Ckx};pDga{{v@rR z`;(>pJ)SHd&OqnN}#(6&3Jkj&XmdTz^womhV zvSYee=FXXAKiNIA?54d*W!vwZ>*0}?{4*ko*M!XblDoS64(VUBBVFZL3GXV9Q)YH{ zk;G0eG977ZgtJWU;4Bl`JInaCPBONQlZ*~`l96FfGNQGU3`ZK;DtF@fQMhkRJ3NQy zCn3+N$UiaKRgz=fBqh#WQv13~+JI8BJfXCt4=XKeMwXHFqsz#~ah|eiyr*oQ=q1}G zd&%~xWo5_ova)-ox9pkaEqjx_W&a!>Ihf+}heHdzPajMz8=^6Q9u=D%;ZhSafATzX zQ|6gnAZte#nFJZfwsBT64Q}Zq1DZQY?X(!*bxKM^trF6%MhOWIE+MT0 zi%ZLD#U-Swk(yhMEvuD~R)HlXtUB(kRZ=?EEh$|aI7)Zq)icCN;#)h*;C3!DvZJd^ zjB=A1J=|q>9}ihLsFbW6UPjhIew4Xvo8qP9-Z=xZCmC|@o9!(J=K9E?`Q_yBf^u?n zVL3UL=KJ9IBHtFoV0wEe-(-~g>`0e?KCQf!+$fXDDBrPd4VeeEaFjlH$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$Pr+F%zv@159MI~Mc)#Q7oA|Kf>YwaQ(H5SKq}KOg#5}P89tX&gHAP zN2lZ5_WTP0zc%1|EH9J(la`ZH{KrB3KLS4W6qBaWsSfy+mYZ~L4EVl4=Z6758tA+g z#Fyb5=bBCWGXvgaxk;bVq0%w@wt(*m_@kDabdFk1X(3+$e>>nG2K;31E$JKm(*r&& z;GYe6MZjwUzQ}S)ICF&rJQMI60{xo6!`|qk^#zqFMoIeNJ6Ff-)mR=4;fdWhMwk3?bWKO^prd`Pdfec`IK^WR7>he% zj1jGIsvp~MhPcF!Ymismfkj>Wua45$VOpxM+v>Uou|;V+5^YsKO@jWx5id8JIYnAD zx@BWc`r>A4^>Mpu(^bX0a*7OTbLlrTyv?Q-jazwF7yJ`g%1647=`996Q7@ge@fBnuyB%gJ@0?qJCG9sGXAC2N(wiCE$l&(0 zcPdzyMA1vFXm}aU5kKHMH}re_!&>bpwD_%AbONX8W^Fi*l(U1iiW4s$Ayt%K-oVkA zy}`h)G4}dF`Z2rR2wpogetOpenGLView(); - if(!glview) { - glview = GLView::create("My Game"); - director->setOpenGLView(glview); - } - - // turn on display FPS - director->setDisplayStats(true); - - // set FPS. the default value is 1.0/60 if you don't call this - director->setAnimationInterval(1.0 / 60); - - ScriptingCore* sc = ScriptingCore::getInstance(); - sc->addRegisterCallback(register_all_cocos2dx); - sc->addRegisterCallback(register_all_cocos2dx_extension); - sc->addRegisterCallback(register_cocos2dx_js_extensions); - sc->addRegisterCallback(register_all_cocos2dx_extension_manual); - sc->addRegisterCallback(jsb_register_chipmunk); - sc->addRegisterCallback(JSB_register_opengl); - sc->addRegisterCallback(jsb_register_system); - sc->start(); - - ScriptEngineProtocol *engine = ScriptingCore::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - ScriptingCore::getInstance()->runScript("cocos2d-jsb.js"); - - return true; -} - -// This function will be called when the app is inactive. When comes a phone call,it's be invoked too -void AppDelegate::applicationDidEnterBackground() -{ - Director::getInstance()->stopAnimation(); - SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); - SimpleAudioEngine::getInstance()->pauseAllEffects(); -} - -// this function will be called when the app is active again -void AppDelegate::applicationWillEnterForeground() -{ - Director::getInstance()->startAnimation(); - SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); - SimpleAudioEngine::getInstance()->resumeAllEffects(); -} diff --git a/templates/multi-platform-js/Classes/AppDelegate.h b/templates/multi-platform-js/Classes/AppDelegate.h deleted file mode 100644 index 9a158eae61..0000000000 --- a/templates/multi-platform-js/Classes/AppDelegate.h +++ /dev/null @@ -1,45 +0,0 @@ -// -// GCTestAppDelegate.h -// GCTest -// -// Created by Rohan Kuruvilla on 06/08/2012. -// Copyright __MyCompanyName__ 2012. All rights reserved. -// - -#ifndef _APP_DELEGATE_H_ -#define _APP_DELEGATE_H_ - -#include "cocos2d.h" -/** - @brief The cocos2d Application. - - The reason for implement as private inheritance is to hide some interface call by Director. - */ -class AppDelegate : private cocos2d::Application -{ -public: - AppDelegate(); - virtual ~AppDelegate(); - - /** - @brief Implement Director and Scene init code here. - @return true Initialize success, app continue. - @return false Initialize failed, app terminate. - */ - virtual bool applicationDidFinishLaunching(); - - /** - @brief The function be called when the application enter background - @param the pointer of the application - */ - virtual void applicationDidEnterBackground(); - - /** - @brief The function be called when the application enter foreground - @param the pointer of the application - */ - virtual void applicationWillEnterForeground(); -}; - -#endif // _APP_DELEGATE_H_ - diff --git a/templates/multi-platform-js/Resources/cocos2d-jsb.js b/templates/multi-platform-js/Resources/cocos2d-jsb.js deleted file mode 100644 index c2bc0ff739..0000000000 --- a/templates/multi-platform-js/Resources/cocos2d-jsb.js +++ /dev/null @@ -1,53 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010-2012 cocos2d-x.org - - http://www.cocos2d-x.org - - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -// boot code needed for cocos2d + JS bindings. -// Not needed by cocos2d-html5 - -require("jsb.js"); - -var appFiles = [ - 'src/resource.js', - 'src/myApp.js' -]; - -cc.dumpConfig(); - -for( var i=0; i < appFiles.length; i++) { - require( appFiles[i] ); -} - -var director = cc.Director.getInstance(); -director.setDisplayStats(true); - -// set FPS. the default value is 1.0/60 if you don't call this -director.setAnimationInterval(1.0 / 60); - -// create a scene. it's an autorelease object -var myScene = new MyScene(); - -// run -director.runWithScene(myScene); - diff --git a/templates/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id b/templates/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id deleted file mode 100644 index f02d84fd8f..0000000000 --- a/templates/multi-platform-js/Resources/res/HelloWorld.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -5fe89fb5bd58cedf13b0363f97b20e3ea7ff255d \ No newline at end of file diff --git a/templates/multi-platform-js/Resources/src/myApp.js b/templates/multi-platform-js/Resources/src/myApp.js deleted file mode 100644 index e3831081b7..0000000000 --- a/templates/multi-platform-js/Resources/src/myApp.js +++ /dev/null @@ -1,99 +0,0 @@ -/**************************************************************************** - 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 MyLayer = cc.Layer.extend({ - isMouseDown:false, - helloImg:null, - helloLabel:null, - circle:null, - sprite:null, - - ctor:function() { - this._super(); - cc.associateWithNative( this, cc.Layer ); - }, - - init:function () { - - ////////////////////////////// - // 1. super init first - this._super(); - - ///////////////////////////// - // 2. add a menu item with "X" image, which is clicked to quit the program - // you may modify it. - // ask director the window size - var size = cc.Director.getInstance().getWinSize(); - - // add a "close" icon to exit the progress. it's an autorelease object - var closeItem = cc.MenuItemImage.create( - "res/CloseNormal.png", - "res/CloseSelected.png", - function () { - cc.log("close button was clicked."); - },this); - closeItem.setAnchorPoint(cc.p(0.5, 0.5)); - - var menu = cc.Menu.create(closeItem); - menu.setPosition(cc.p(0, 0)); - this.addChild(menu, 1); - closeItem.setPosition(cc.p(size.width - 20, 20)); - - ///////////////////////////// - // 3. add your codes below... - // add a label shows "Hello World" - // create and initialize a label - this.helloLabel = cc.LabelTTF.create("Hello World", "Arial", 38); - // position the label on the center of the screen - this.helloLabel.setPosition(cc.p(size.width / 2, size.height - 40)); - // add the label as a child to this layer - this.addChild(this.helloLabel, 5); - - // add "Helloworld" splash screen" - this.sprite = cc.Sprite.create("res/HelloWorld.png"); - this.sprite.setAnchorPoint(cc.p(0.5, 0.5)); - this.sprite.setPosition(cc.p(size.width / 2, size.height / 2)); - - this.addChild(this.sprite, 0); - - return true; - } - -}); - -var MyScene = cc.Scene.extend({ - ctor:function() { - this._super(); - cc.associateWithNative( this, cc.Scene ); - }, - - onEnter:function () { - this._super(); - var layer = new MyLayer(); - this.addChild(layer); - layer.init(); - } -}); diff --git a/templates/multi-platform-js/Resources/src/resource.js b/templates/multi-platform-js/Resources/src/resource.js deleted file mode 100644 index 5bfb37a53b..0000000000 --- a/templates/multi-platform-js/Resources/src/resource.js +++ /dev/null @@ -1,20 +0,0 @@ -var s_HelloWorld = "res/HelloWorld.png"; -var s_CloseNormal = "res/CloseNormal.png"; -var s_CloseSelected = "res/CloseSelected.png"; - -var g_resources = [ - //image - {src:s_HelloWorld}, - {src:s_CloseNormal}, - {src:s_CloseSelected} - - //plist - - //fnt - - //tmx - - //bgm - - //effect -]; diff --git a/templates/multi-platform-js/proj.android/.classpath b/templates/multi-platform-js/proj.android/.classpath deleted file mode 100644 index 0b08408342..0000000000 --- a/templates/multi-platform-js/proj.android/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/templates/multi-platform-js/proj.android/.project b/templates/multi-platform-js/proj.android/.project deleted file mode 100644 index df461895c5..0000000000 --- a/templates/multi-platform-js/proj.android/.project +++ /dev/null @@ -1,65 +0,0 @@ - - - HelloJavascript - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder - full,incremental, - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - org.eclipse.cdt.core.cnature - org.eclipse.cdt.core.ccnature - org.eclipse.cdt.managedbuilder.core.managedBuildNature - org.eclipse.cdt.managedbuilder.core.ScannerConfigNature - - - - Classes - 2 - COCOS2DX/projects/HelloJavascript/Classes - - - cocos2dx - 2 - COCOS2DX/cocos2dx - - - extensions - 2 - COCOS2DX/extensions - - - scripting - 2 - COCOS2DX/scripting - - - diff --git a/templates/multi-platform-js/proj.android/AndroidManifest.xml b/templates/multi-platform-js/proj.android/AndroidManifest.xml deleted file mode 100644 index 3c3045b22c..0000000000 --- a/templates/multi-platform-js/proj.android/AndroidManifest.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/multi-platform-js/proj.android/README.md b/templates/multi-platform-js/proj.android/README.md deleted file mode 100644 index 312835611a..0000000000 --- a/templates/multi-platform-js/proj.android/README.md +++ /dev/null @@ -1,87 +0,0 @@ -## Prerequisites: - -* Android NDK -* Android SDK **OR** Eclipse ADT Bundle -* Android AVD target installed - -## Building project - -There are two ways of building Android projects. - -1. Eclipse -2. Command Line - -### Import Project in Eclipse - -#### Features: - -1. Complete workflow from Eclipse, including: - * Build C++. - * Clean C++. - * Build and Run whole project. - * Logcat view. - * Debug Java code. - * Javascript editor. - * Project management. -2. True C++ editing, including: - * Code completion. - * Jump to definition. - * Refactoring tools etc. - * Quick open C++ files. - - -#### Setup Eclipse Environment (only once) - - -**NOTE:** This step needs to be done only once to setup the Eclipse environment for cocos2d-x projects. Skip this section if you've done this before. - -1. Download Eclipse ADT bundle from [Google ADT homepage](http://developer.android.com/sdk/index.html) - - **OR** - - Install Eclipse with Java. Add ADT and CDT plugins. - -2. Only for Windows - 1. Install [Cygwin](http://www.cygwin.com/) with make (select make package from the list during the install). - 2. Add `Cygwin\bin` directory to system PATH variable. - 3. Add this line `none /cygdrive cygdrive binary,noacl,posix=0,user 0 0` to `Cygwin\etc\fstab` file. - -3. Set up Variables: - 1. Path Variable `COCOS2DX`: - * Eclipse->Preferences->General->Workspace->**Linked Resources** - * Click **New** button to add a Path Variable `COCOS2DX` pointing to the root cocos2d-x directory. - ![Example](https://lh5.googleusercontent.com/-oPpk9kg3e5w/UUOYlq8n7aI/AAAAAAAAsdQ/zLA4eghBH9U/s400/cocos2d-x-eclipse-vars.png) - - 2. C/C++ Environment Variable `NDK_ROOT`: - * Eclipse->Preferences->C/C++->Build->**Environment**. - * Click **Add** button and add a new variable `NDK_ROOT` pointing to the root NDK directory. - ![Example](https://lh3.googleusercontent.com/-AVcY8IAT0_g/UUOYltoRobI/AAAAAAAAsdM/22D2J9u3sig/s400/cocos2d-x-eclipse-ndk.png) - * Only for Windows: Add new variables **CYGWIN** with value `nodosfilewarning` and **SHELLOPTS** with value `igncr` - -4. Import libcocos2dx library project: - 1. File->New->Project->Android Project From Existing Code. - 2. Click **Browse** button and open `cocos2d-x/cocos2dx/platform/android/java` directory. - 3. Click **Finish** to add project. - -#### Adding and running from Eclipse - -![Example](https://lh3.googleusercontent.com/-SLBOu6e3QbE/UUOcOXYaGqI/AAAAAAAAsdo/tYBY2SylOSM/s288/cocos2d-x-eclipse-project-from-code.png) ![Import](https://lh5.googleusercontent.com/-XzC9Pn65USc/UUOcOTAwizI/AAAAAAAAsdk/4b6YM-oim9Y/s400/cocos2d-x-eclipse-import-project.png) - -1. File->New->Project->Android Project From Existing Code -2. **Browse** to your project directory. eg: `cocos2d-x/cocos2dx/samples/Cpp/TestCpp/proj.android/` -3. Add the project -4. Click **Run** or **Debug** to compile C++ followed by Java and to run on connected device or emulator. - - -### Running project from Command Line - - $ cd cocos2d-x/samples/Cpp/TestCpp/proj.android/ - $ export NDK_ROOT=/path/to/ndk - $ ./build_native.sh - $ ant debug install - -If the last command results in sdk.dir missing error then do: - - $ android list target - $ android update project -p . -t (id from step 6) - $ android update project -p cocos2d-x/cocos2dx/platform/android/java/ -t (id from step 6) diff --git a/templates/multi-platform-js/proj.android/ant.properties b/templates/multi-platform-js/proj.android/ant.properties deleted file mode 100644 index f8af38bfb4..0000000000 --- a/templates/multi-platform-js/proj.android/ant.properties +++ /dev/null @@ -1 +0,0 @@ -aapt.ignore.assets="!*.pvr.gz:!*.gz:!.svn:!.git:.*:_*:!CVS:!thumbs.db:!picasa.ini:!*.scc:*~" diff --git a/templates/multi-platform-js/proj.android/build.xml b/templates/multi-platform-js/proj.android/build.xml deleted file mode 100644 index f02386c506..0000000000 --- a/templates/multi-platform-js/proj.android/build.xml +++ /dev/null @@ -1,92 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/multi-platform-js/proj.android/build_native.py b/templates/multi-platform-js/proj.android/build_native.py deleted file mode 100755 index 561a0e8981..0000000000 --- a/templates/multi-platform-js/proj.android/build_native.py +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/python -# build_native.py -# Build native codes - - -import sys -import os, os.path -import shutil -from optparse import OptionParser - -def get_num_of_cpu(): - ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. - ''' - try: - platform = sys.platform - if platform == 'win32': - if 'NUMBER_OF_PROCESSORS' in os.environ: - return int(os.environ['NUMBER_OF_PROCESSORS']) - else: - return 1 - else: - from numpy.distutils import cpuinfo - return cpuinfo.cpu._getNCPUs() - except Exception: - print "Can't know cpuinfo, use default 1 cpu" - return 1 - -def check_environment_variables_sdk(): - ''' Checking the environment ANDROID_SDK_ROOT, which will be used for building - ''' - - try: - SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] - except Exception: - print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment" - sys.exit(1) - - return SDK_ROOT - -def check_environment_variables(): - ''' Checking the environment NDK_ROOT, which will be used for building - ''' - - try: - NDK_ROOT = os.environ['NDK_ROOT'] - except Exception: - print "NDK_ROOT not defined. Please define NDK_ROOT in your environment" - sys.exit(1) - - return NDK_ROOT - -def select_toolchain_version(): - '''Because ndk-r8e uses gcc4.6 as default. gcc4.6 doesn't support c++11. So we should select gcc4.7 when - using ndk-r8e. But gcc4.7 is removed in ndk-r9, so we should determine whether gcc4.7 exist. - Conclution: - ndk-r8e -> use gcc4.7 - ndk-r9 -> use gcc4.8 - ''' - - ndk_root = check_environment_variables() - if os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.8")): - os.environ['NDK_TOOLCHAIN_VERSION'] = '4.8' - print "The Selected NDK toolchain version was 4.8 !" - elif os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.7")): - os.environ['NDK_TOOLCHAIN_VERSION'] = '4.7' - print "The Selected NDK toolchain version was 4.7 !" - else: - print "Couldn't find the gcc toolchain." - exit(1) - -def do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode): - - ndk_path = os.path.join(ndk_root, "ndk-build") - - # windows should use ";" to seperate module paths - platform = sys.platform - if platform == 'win32': - ndk_module_path = 'NDK_MODULE_PATH=%s;%s/external;%s/cocos' % (cocos_root, cocos_root, cocos_root) - else: - ndk_module_path = 'NDK_MODULE_PATH=%s:%s/external:%s/cocos' % (cocos_root, cocos_root, cocos_root) - - num_of_cpu = get_num_of_cpu() - - if ndk_build_param == None: - command = '%s -j%d -C %s %s' % (ndk_path, num_of_cpu, app_android_root, ndk_module_path) - else: - command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ''.join(str(e) for e in ndk_build_param), ndk_module_path) - if os.system(command) != 0: - raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") - elif android_platform is not None: - sdk_tool_path = os.path.join(sdk_root, "tools/android") - cocoslib_path = os.path.join(cocos_root, "cocos/2d/platform/android/java") - command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path) - if os.system(command) != 0: - raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!") - command = '%s update project -t %s -p %s -s' % (sdk_tool_path,android_platform,app_android_root) - if os.system(command) != 0: - raise Exception("update project [ " + app_android_root + " ] fails!") - buildfile_path = os.path.join(app_android_root, "build.xml") - command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,sdk_root) - os.system(command) - -def copy_files(src, dst): - - for item in os.listdir(src): - path = os.path.join(src, item) - # Android can not package the file that ends with ".gz" - if not item.startswith('.') and not item.endswith('.gz') and os.path.isfile(path): - shutil.copy(path, dst) - if os.path.isdir(path): - new_dst = os.path.join(dst, item) - os.mkdir(new_dst) - copy_files(path, new_dst) - -def copy_resources(app_android_root): - - # remove app_android_root/assets if it exists - assets_dir = os.path.join(app_android_root, "assets") - if os.path.isdir(assets_dir): - shutil.rmtree(assets_dir) - - # copy resources - os.mkdir(assets_dir) - resources_dir = os.path.join(app_android_root, "../Resources") - if os.path.isdir(resources_dir): - copy_files(resources_dir, assets_dir) - - # jsb project should copy javascript files and resources(shared with cocos2d-html5) - resources_dir = os.path.join(app_android_root, "../cocos2d/cocos/scripting/javascript/script") - copy_files(resources_dir, assets_dir) - -def build(ndk_build_param,android_platform,build_mode): - - ndk_root = check_environment_variables() - sdk_root = None - select_toolchain_version() - - current_dir = os.path.dirname(os.path.realpath(__file__)) - cocos_root = os.path.join(current_dir, "../cocos2d") - - app_android_root = current_dir - copy_resources(app_android_root) - - if android_platform is not None: - sdk_root = check_environment_variables_sdk() - if android_platform.isdigit(): - android_platform = 'android-'+android_platform - else: - print 'please use vaild android platform' - exit(1) - - if build_mode is None: - build_mode = 'debug' - elif build_mode != 'release': - build_mode = 'debug' - - do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) - -# -------------- main -------------- -if __name__ == '__main__': - - parser = OptionParser() - parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build') - parser.add_option("-p", "--platform", dest="android_platform", - help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') - parser.add_option("-b", "--build", dest="build_mode", - help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') - (opts, args) = parser.parse_args() - - build(opts.ndk_build_param,opts.android_platform,opts.build_mode) diff --git a/templates/multi-platform-js/proj.android/jni/Android.mk b/templates/multi-platform-js/proj.android/jni/Android.mk deleted file mode 100644 index 48746a0ffc..0000000000 --- a/templates/multi-platform-js/proj.android/jni/Android.mk +++ /dev/null @@ -1,27 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := cocos2djs_shared - -LOCAL_MODULE_FILENAME := libcocos2djs - -LOCAL_SRC_FILES := hellojavascript/main.cpp \ - ../../Classes/AppDelegate.cpp - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes - -LOCAL_WHOLE_STATIC_LIBRARIES := cocos_jsb_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_extension_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_chipmunk_static -LOCAL_WHOLE_STATIC_LIBRARIES += jsb_localstorage_static - -LOCAL_EXPORT_CFLAGS := -DCOCOS2D_DEBUG=2 -DCOCOS2D_JAVASCRIPT - -include $(BUILD_SHARED_LIBRARY) - - -$(call import-module,scripting/javascript/bindings) -$(call import-module,scripting/javascript/bindings/extension) -$(call import-module,scripting/javascript/bindings/chipmunk) -$(call import-module,scripting/javascript/bindings/localstorage) \ No newline at end of file diff --git a/templates/multi-platform-js/proj.android/jni/Application.mk b/templates/multi-platform-js/proj.android/jni/Application.mk deleted file mode 100644 index 76c0f20fca..0000000000 --- a/templates/multi-platform-js/proj.android/jni/Application.mk +++ /dev/null @@ -1,4 +0,0 @@ -APP_STL := gnustl_static -APP_CPPFLAGS := -frtti -APP_CPPFLAGS += -DCOCOS2D_DEBUG=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char - diff --git a/templates/multi-platform-js/proj.android/jni/hellojavascript/main.cpp b/templates/multi-platform-js/proj.android/jni/hellojavascript/main.cpp deleted file mode 100644 index 9793beefb1..0000000000 --- a/templates/multi-platform-js/proj.android/jni/hellojavascript/main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "AppDelegate.h" -#include "cocos2d.h" -#include "platform/android/jni/JniHelper.h" -#include "CCEventType.h" -#include -#include - -#define LOG_TAG "main" -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) - -using namespace cocos2d; - -void cocos_android_app_init (struct android_app* app) { - LOGD("cocos_android_app_init"); - AppDelegate *pAppDelegate = new AppDelegate(); -} diff --git a/templates/multi-platform-js/proj.android/proguard-project.txt b/templates/multi-platform-js/proj.android/proguard-project.txt deleted file mode 100644 index f2fe1559a2..0000000000 --- a/templates/multi-platform-js/proj.android/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/templates/multi-platform-js/proj.android/project.properties b/templates/multi-platform-js/proj.android/project.properties deleted file mode 100644 index 73be4bf688..0000000000 --- a/templates/multi-platform-js/proj.android/project.properties +++ /dev/null @@ -1,13 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-13 - -android.library.reference.1=../cocos2d/cocos/2d/platform/android/java diff --git a/templates/multi-platform-js/proj.android/res/values/strings.xml b/templates/multi-platform-js/proj.android/res/values/strings.xml deleted file mode 100644 index c847de2851..0000000000 --- a/templates/multi-platform-js/proj.android/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - HelloJavascript - diff --git a/templates/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java b/templates/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java deleted file mode 100644 index 928da4653a..0000000000 --- a/templates/multi-platform-js/proj.android/src/org/cocos2dx/javascript/Cocos2dxActivity.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cocos2dx.javascript; - -import android.app.NativeActivity; -import android.os.Bundle; - -public class Cocos2dxActivity extends NativeActivity{ - - @Override - protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub - super.onCreate(savedInstanceState); - - //For supports translucency - - //1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp - /*const EGLint attribs[] = { - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - //EGL_BLUE_SIZE, 5, -->delete - //EGL_GREEN_SIZE, 6, -->delete - //EGL_RED_SIZE, 5, -->delete - EGL_BUFFER_SIZE, 32, //-->new field - EGL_DEPTH_SIZE, 16, - EGL_STENCIL_SIZE, 8, - EGL_NONE - };*/ - - //2.Set the format of window - // getWindow().setFormat(PixelFormat.TRANSLUCENT); - - } -} diff --git a/templates/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj b/templates/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj deleted file mode 100644 index ac972dc331..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/HelloJavascript.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1111 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 15FD5C60183A60FE005CFF55 /* cocos2d-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C5F183A60FE005CFF55 /* cocos2d-jsb.js */; }; - 15FD5C68183A6112005CFF55 /* cocos2d-jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C67183A6112005CFF55 /* cocos2d-jsb.js */; }; - 15FD5C6B183A6170005CFF55 /* jsb_cocos2d_gui.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */; }; - 15FD5C6C183A6170005CFF55 /* jsb_cocos2d_studio.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */; }; - 15FD5C6F183A618A005CFF55 /* jsb_cocos2d_gui.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */; }; - 15FD5C70183A618A005CFF55 /* jsb_cocos2d_studio.js in Resources */ = {isa = PBXBuildFile; fileRef = 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */; }; - 1A6767FA180E9B160076BC67 /* debugger in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767ED180E9B160076BC67 /* debugger */; }; - 1A6767FB180E9B160076BC67 /* debugger in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767ED180E9B160076BC67 /* debugger */; }; - 1A676829180E9C060076BC67 /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */; }; - 1A67682A180E9C060076BC67 /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */; }; - 1A67682B180E9C060076BC67 /* libcocos2dx-extensions Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */; }; - 1A67682C180E9C060076BC67 /* libCocosDenshion Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */; }; - 1A67682D180E9C060076BC67 /* libjsbindings Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB52180E9ACB004C840B /* libjsbindings Mac.a */; }; - 1A676838180E9C1E0076BC67 /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */; }; - 1A676839180E9C1E0076BC67 /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */; }; - 1A67683A180E9C1E0076BC67 /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */; }; - 1A67683B180E9C1E0076BC67 /* libCocosDenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */; }; - 1A67683C180E9C1E0076BC67 /* libjsbindings iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AC6FB60180E9ACB004C840B /* libjsbindings iOS.a */; }; - 1A67683E180E9CE90076BC67 /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */; }; - 1A67683F180E9CE90076BC67 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */; }; - 1A676840180E9CE90076BC67 /* jsb_cocos2d_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */; }; - 1A676841180E9CE90076BC67 /* jsb_cocos2d_extension.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */; }; - 1A676842180E9CE90076BC67 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */; }; - 1A676843180E9CE90076BC67 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */; }; - 1A676844180E9CE90076BC67 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F4180E9B160076BC67 /* jsb_debugger.js */; }; - 1A676845180E9CE90076BC67 /* jsb_deprecated.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */; }; - 1A676846180E9CE90076BC67 /* jsb_opengl_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */; }; - 1A676847180E9CE90076BC67 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F7180E9B160076BC67 /* jsb_opengl.js */; }; - 1A676848180E9CE90076BC67 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F8180E9B160076BC67 /* jsb_sys.js */; }; - 1A676849180E9CE90076BC67 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F9180E9B160076BC67 /* jsb.js */; }; - 1A67684A180E9CF10076BC67 /* jsb_chipmunk_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */; }; - 1A67684B180E9CF10076BC67 /* jsb_chipmunk.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */; }; - 1A67684C180E9CF10076BC67 /* jsb_cocos2d_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */; }; - 1A67684D180E9CF10076BC67 /* jsb_cocos2d_extension.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */; }; - 1A67684E180E9CF10076BC67 /* jsb_cocos2d.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */; }; - 1A67684F180E9CF10076BC67 /* jsb_cocosbuilder.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */; }; - 1A676850180E9CF10076BC67 /* jsb_debugger.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F4180E9B160076BC67 /* jsb_debugger.js */; }; - 1A676851180E9CF10076BC67 /* jsb_deprecated.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */; }; - 1A676852180E9CF10076BC67 /* jsb_opengl_constants.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */; }; - 1A676853180E9CF10076BC67 /* jsb_opengl.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F7180E9B160076BC67 /* jsb_opengl.js */; }; - 1A676854180E9CF10076BC67 /* jsb_sys.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F8180E9B160076BC67 /* jsb_sys.js */; }; - 1A676855180E9CF10076BC67 /* jsb.js in Resources */ = {isa = PBXBuildFile; fileRef = 1A6767F9180E9B160076BC67 /* jsb.js */; }; - 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; - 1AE4B40416D1FECD003C6D1C /* res in Resources */ = {isa = PBXBuildFile; fileRef = 1AE4B40116D1FECD003C6D1C /* res */; }; - 1AE4B40516D1FECD003C6D1C /* src in Resources */ = {isa = PBXBuildFile; fileRef = 1AE4B40216D1FECD003C6D1C /* src */; }; - 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 502380DB17EBB88200990C9B /* libcurl.dylib */; }; - 5091731A17ECDF7A00D62437 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731417ECDF7A00D62437 /* Icon-29.png */; }; - 5091731B17ECDF7A00D62437 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731517ECDF7A00D62437 /* Icon-40.png */; }; - 5091731C17ECDF7A00D62437 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731617ECDF7A00D62437 /* Icon-50.png */; }; - 5091731D17ECDF7A00D62437 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731717ECDF7A00D62437 /* Icon-58.png */; }; - 5091731E17ECDF7A00D62437 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731817ECDF7A00D62437 /* Icon-80.png */; }; - 5091731F17ECDF7A00D62437 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091731917ECDF7A00D62437 /* Icon-100.png */; }; - 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; - 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */; }; - 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; - 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275411517C094001B78AA /* QuartzCore.framework */; }; - 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275451517C094001B78AA /* OpenAL.framework */; }; - 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275471517C094001B78AA /* AudioToolbox.framework */; }; - 509D4A8E17EBB24E00697056 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A92275491517C094001B78AA /* AVFoundation.framework */; }; - 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754D1517C094001B78AA /* Foundation.framework */; }; - 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = A922754F1517C094001B78AA /* CoreGraphics.framework */; }; - 509D4AA517EBB24E00697056 /* res in Resources */ = {isa = PBXBuildFile; fileRef = 1AE4B40116D1FECD003C6D1C /* res */; }; - 509D4AA617EBB24E00697056 /* src in Resources */ = {isa = PBXBuildFile; fileRef = 1AE4B40216D1FECD003C6D1C /* src */; }; - 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AAC17EBB2AB00697056 /* AppController.mm */; }; - 509D4ABD17EBB2AB00697056 /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */; }; - 509D4ABE17EBB2AB00697056 /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAE17EBB2AB00697056 /* Default.png */; }; - 509D4ABF17EBB2AB00697056 /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AAF17EBB2AB00697056 /* Default@2x.png */; }; - 509D4AC017EBB2AB00697056 /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB017EBB2AB00697056 /* Icon-57.png */; }; - 509D4AC117EBB2AB00697056 /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB117EBB2AB00697056 /* Icon-72.png */; }; - 509D4AC217EBB2AB00697056 /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB217EBB2AB00697056 /* Icon-76.png */; }; - 509D4AC317EBB2AB00697056 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB317EBB2AB00697056 /* Icon-114.png */; }; - 509D4AC417EBB2AB00697056 /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB417EBB2AB00697056 /* Icon-120.png */; }; - 509D4AC517EBB2AB00697056 /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB517EBB2AB00697056 /* Icon-144.png */; }; - 509D4AC617EBB2AB00697056 /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 509D4AB617EBB2AB00697056 /* Icon-152.png */; }; - 509D4AC817EBB2AB00697056 /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 509D4AB817EBB2AB00697056 /* main.m */; }; - 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 509D4ABB17EBB2AB00697056 /* RootViewController.mm */; }; - 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 509D4ACB17EBB2BE00697056 /* Icon.icns */; }; - 509D4AD117EBB2BE00697056 /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 509D4ACD17EBB2BE00697056 /* main.cpp */; }; - 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE617EBB81800697056 /* OpenGL.framework */; }; - 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AE817EBB82000697056 /* AppKit.framework */; }; - 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 509D4AEA17EBB82600697056 /* IOKit.framework */; }; - 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 */; }; - D454520C156E22BD00887EB5 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = D454520B156E22BD00887EB5 /* libz.dylib */; }; - D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = D4545215156E28EF00887EB5 /* AppDelegate.cpp */; }; - D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B061231803AB9F0077942B /* CoreMotion.framework */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 1A67681F180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = 1551A33E158F2AB200E66CFE; - remoteInfo = "cocos2dx Mac"; - }; - 1A676821180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F2FC117814595006731B9; - remoteInfo = "cocos2dx-extensions Mac"; - }; - 1A676823180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F2B781780BD04006731B9; - remoteInfo = "chipmunk Mac"; - }; - 1A676825180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F2E9817814268006731B9; - remoteInfo = "CocosDenshion Mac"; - }; - 1A676827180E9BF70076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A03F31E81781479B006731B9; - remoteInfo = "jsbindings Mac"; - }; - 1A67682E180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4C241783777C0073F6A7; - remoteInfo = "cocos2dx iOS"; - }; - 1A676830180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4E111783867C0073F6A7; - remoteInfo = "cocos2dx-extensions iOS"; - }; - 1A676832180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4EFD178387670073F6A7; - remoteInfo = "chipmunk iOS"; - }; - 1A676834180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4F9F178387730073F6A7; - remoteInfo = "CocosDenshion iOS"; - }; - 1A676836180E9C110076BC67 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 1; - remoteGlobalIDString = A07A4FB5178387750073F6A7; - remoteInfo = "jsbindings iOS"; - }; - 1AC6FB47180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1551A33F158F2AB200E66CFE; - remoteInfo = "cocos2dx Mac"; - }; - 1AC6FB49180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2FD617814595006731B9; - remoteInfo = "cocos2dx-extensions Mac"; - }; - 1AC6FB4B180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2CB81780BD04006731B9; - remoteInfo = "chipmunk Mac"; - }; - 1AC6FB4D180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2D9B1780BDF7006731B9; - remoteInfo = "box2d Mac"; - }; - 1AC6FB4F180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2ED617814268006731B9; - remoteInfo = "CocosDenshion Mac"; - }; - 1AC6FB51180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F31FD1781479B006731B9; - remoteInfo = "jsbindings Mac"; - }; - 1AC6FB53180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1A6FB53017854BC300CDF010; - remoteInfo = "luabindings Mac"; - }; - 1AC6FB55180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4D641783777C0073F6A7; - remoteInfo = "cocos2dx iOS"; - }; - 1AC6FB57180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4EFC1783867C0073F6A7; - remoteInfo = "cocos2dx-extensions iOS"; - }; - 1AC6FB59180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4F3B178387670073F6A7; - remoteInfo = "chipmunk iOS"; - }; - 1AC6FB5B180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4F9E1783876B0073F6A7; - remoteInfo = "box2d iOS"; - }; - 1AC6FB5D180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4FB4178387730073F6A7; - remoteInfo = "CocosDenshion iOS"; - }; - 1AC6FB5F180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A5030178387750073F6A7; - remoteInfo = "jsbindings iOS"; - }; - 1AC6FB61180E9ACB004C840B /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1A119791178526AA00D62A44; - remoteInfo = "luabindings iOS"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 15FD5C5F183A60FE005CFF55 /* cocos2d-jsb.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = "cocos2d-jsb.js"; path = "../Resources/cocos2d-jsb.js"; sourceTree = ""; }; - 15FD5C67183A6112005CFF55 /* cocos2d-jsb.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = "cocos2d-jsb.js"; path = "../Resources/cocos2d-jsb.js"; sourceTree = ""; }; - 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; - 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; - 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_gui.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_gui.js; sourceTree = ""; }; - 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_studio.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_studio.js; sourceTree = ""; }; - 1A6767ED180E9B160076BC67 /* debugger */ = {isa = PBXFileReference; lastKnownFileType = folder; name = debugger; path = ../cocos2d/cocos/scripting/javascript/script/debugger; sourceTree = ""; }; - 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_chipmunk_constants.js; sourceTree = ""; }; - 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_chipmunk.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_chipmunk.js; sourceTree = ""; }; - 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_constants.js; sourceTree = ""; }; - 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d_extension.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d_extension.js; sourceTree = ""; }; - 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocos2d.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocos2d.js; sourceTree = ""; }; - 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_cocosbuilder.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_cocosbuilder.js; sourceTree = ""; }; - 1A6767F4180E9B160076BC67 /* jsb_debugger.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_debugger.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_debugger.js; sourceTree = ""; }; - 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_deprecated.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_deprecated.js; sourceTree = ""; }; - 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl_constants.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_opengl_constants.js; sourceTree = ""; }; - 1A6767F7180E9B160076BC67 /* jsb_opengl.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_opengl.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_opengl.js; sourceTree = ""; }; - 1A6767F8180E9B160076BC67 /* jsb_sys.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb_sys.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb_sys.js; sourceTree = ""; }; - 1A6767F9180E9B160076BC67 /* jsb.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = jsb.js; path = ../cocos2d/cocos/scripting/javascript/script/jsb.js; sourceTree = ""; }; - 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libsqlite3.dylib; path = usr/lib/libsqlite3.dylib; sourceTree = SDKROOT; }; - 1A96A4F2174A3432008653A9 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../cocos2d/cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; - 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; - 1AE4B40016D1FECD003C6D1C /* main.js */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.javascript; name = main.js; path = ../Resources/main.js; sourceTree = ""; }; - 1AE4B40116D1FECD003C6D1C /* res */ = {isa = PBXFileReference; lastKnownFileType = folder; name = res; path = ../Resources/res; sourceTree = ""; }; - 1AE4B40216D1FECD003C6D1C /* src */ = {isa = PBXFileReference; lastKnownFileType = folder; name = src; path = ../Resources/src; sourceTree = ""; }; - 502380DB17EBB88200990C9B /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; - 5091731417ECDF7A00D62437 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-29.png"; path = "ios/Icon-29.png"; sourceTree = ""; }; - 5091731517ECDF7A00D62437 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-40.png"; path = "ios/Icon-40.png"; sourceTree = ""; }; - 5091731617ECDF7A00D62437 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-50.png"; path = "ios/Icon-50.png"; sourceTree = ""; }; - 5091731717ECDF7A00D62437 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-58.png"; path = "ios/Icon-58.png"; sourceTree = ""; }; - 5091731817ECDF7A00D62437 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-80.png"; path = "ios/Icon-80.png"; sourceTree = ""; }; - 5091731917ECDF7A00D62437 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-100.png"; path = "ios/Icon-100.png"; sourceTree = ""; }; - 509D4AAA17EBB24E00697056 /* HelloJavascript Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloJavascript Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 509D4AAB17EBB2AB00697056 /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppController.h; path = ios/AppController.h; sourceTree = ""; }; - 509D4AAC17EBB2AB00697056 /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = AppController.mm; path = ios/AppController.mm; sourceTree = ""; }; - 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default-568h@2x.png"; path = "ios/Default-568h@2x.png"; sourceTree = ""; }; - 509D4AAE17EBB2AB00697056 /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = Default.png; path = ios/Default.png; sourceTree = ""; }; - 509D4AAF17EBB2AB00697056 /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Default@2x.png"; path = "ios/Default@2x.png"; sourceTree = ""; }; - 509D4AB017EBB2AB00697056 /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-57.png"; path = "ios/Icon-57.png"; sourceTree = ""; }; - 509D4AB117EBB2AB00697056 /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-72.png"; path = "ios/Icon-72.png"; sourceTree = ""; }; - 509D4AB217EBB2AB00697056 /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-76.png"; path = "ios/Icon-76.png"; sourceTree = ""; }; - 509D4AB317EBB2AB00697056 /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-114.png"; path = "ios/Icon-114.png"; sourceTree = ""; }; - 509D4AB417EBB2AB00697056 /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-120.png"; path = "ios/Icon-120.png"; sourceTree = ""; }; - 509D4AB517EBB2AB00697056 /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-144.png"; path = "ios/Icon-144.png"; sourceTree = ""; }; - 509D4AB617EBB2AB00697056 /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = "Icon-152.png"; path = "ios/Icon-152.png"; sourceTree = ""; }; - 509D4AB717EBB2AB00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; name = Info.plist; path = ios/Info.plist; sourceTree = ""; }; - 509D4AB817EBB2AB00697056 /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; name = main.m; path = ios/main.m; sourceTree = ""; }; - 509D4AB917EBB2AB00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = Prefix.pch; path = ios/Prefix.pch; sourceTree = ""; }; - 509D4ABA17EBB2AB00697056 /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = RootViewController.h; path = ios/RootViewController.h; sourceTree = ""; }; - 509D4ABB17EBB2AB00697056 /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; name = RootViewController.mm; path = ios/RootViewController.mm; sourceTree = ""; }; - 509D4ACB17EBB2BE00697056 /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; - 509D4ACC17EBB2BE00697056 /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 509D4ACD17EBB2BE00697056 /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; - 509D4ACE17EBB2BE00697056 /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 509D4AE617EBB81800697056 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; - 509D4AE817EBB82000697056 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 509D4AEA17EBB82600697056 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - A922753D1517C094001B78AA /* HelloJavascript iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloJavascript iOS.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; }; - D454520B156E22BD00887EB5 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - D4545215156E28EF00887EB5 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = AppDelegate.cpp; sourceTree = ""; }; - D4545216156E28EF00887EB5 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppDelegate.h; sourceTree = ""; }; - D6B061231803AB9F0077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 509D4A8217EBB24E00697056 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A676829180E9C060076BC67 /* libchipmunk Mac.a in Frameworks */, - 1A67682A180E9C060076BC67 /* libcocos2dx Mac.a in Frameworks */, - 1A67682B180E9C060076BC67 /* libcocos2dx-extensions Mac.a in Frameworks */, - 1A67682C180E9C060076BC67 /* libCocosDenshion Mac.a in Frameworks */, - 1A67682D180E9C060076BC67 /* libjsbindings Mac.a in Frameworks */, - 502380DC17EBB88200990C9B /* libcurl.dylib in Frameworks */, - 509D4A8817EBB24E00697056 /* libsqlite3.dylib in Frameworks */, - 509D4A8917EBB24E00697056 /* libz.dylib in Frameworks */, - 509D4AEB17EBB82600697056 /* IOKit.framework in Frameworks */, - 509D4AE917EBB82000697056 /* AppKit.framework in Frameworks */, - 509D4AE717EBB81800697056 /* OpenGL.framework in Frameworks */, - 509D4A8A17EBB24E00697056 /* QuartzCore.framework in Frameworks */, - 509D4A8C17EBB24E00697056 /* OpenAL.framework in Frameworks */, - 509D4A8D17EBB24E00697056 /* AudioToolbox.framework in Frameworks */, - 509D4A8E17EBB24E00697056 /* AVFoundation.framework in Frameworks */, - 509D4A9017EBB24E00697056 /* Foundation.framework in Frameworks */, - 509D4A9117EBB24E00697056 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A922753A1517C094001B78AA /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 1A676838180E9C1E0076BC67 /* libchipmunk iOS.a in Frameworks */, - 1A676839180E9C1E0076BC67 /* libcocos2dx iOS.a in Frameworks */, - 1A67683A180E9C1E0076BC67 /* libcocos2dx-extensions iOS.a in Frameworks */, - 1A67683B180E9C1E0076BC67 /* libCocosDenshion iOS.a in Frameworks */, - 1A67683C180E9C1E0076BC67 /* libjsbindings iOS.a in Frameworks */, - D6B061241803AB9F0077942B /* CoreMotion.framework in Frameworks */, - 1A82F5FB169AC92500C4B13A /* libsqlite3.dylib in Frameworks */, - D454520C156E22BD00887EB5 /* libz.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 */ - 15628F5B15F0F5C2000CF24B /* Resources */ = { - isa = PBXGroup; - children = ( - 1AE4B40016D1FECD003C6D1C /* main.js */, - 1AE4B40116D1FECD003C6D1C /* res */, - 1AE4B40216D1FECD003C6D1C /* src */, - ); - name = Resources; - sourceTree = ""; - }; - 1A6767EC180E9AF00076BC67 /* JS Common */ = { - isa = PBXGroup; - children = ( - 1A6767ED180E9B160076BC67 /* debugger */, - 1A6767EE180E9B160076BC67 /* jsb_chipmunk_constants.js */, - 1A6767EF180E9B160076BC67 /* jsb_chipmunk.js */, - 1A6767F0180E9B160076BC67 /* jsb_cocos2d_constants.js */, - 1A6767F1180E9B160076BC67 /* jsb_cocos2d_extension.js */, - 1A6767F2180E9B160076BC67 /* jsb_cocos2d.js */, - 1A6767F3180E9B160076BC67 /* jsb_cocosbuilder.js */, - 1A6767F4180E9B160076BC67 /* jsb_debugger.js */, - 1A6767F5180E9B160076BC67 /* jsb_deprecated.js */, - 1A6767F6180E9B160076BC67 /* jsb_opengl_constants.js */, - 1A6767F7180E9B160076BC67 /* jsb_opengl.js */, - 1A6767F8180E9B160076BC67 /* jsb_sys.js */, - 1A6767F9180E9B160076BC67 /* jsb.js */, - ); - name = "JS Common"; - sourceTree = ""; - }; - 1AC6FB35180E9ACB004C840B /* Products */ = { - isa = PBXGroup; - children = ( - 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */, - 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */, - 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */, - 1AC6FB4E180E9ACB004C840B /* libbox2d Mac.a */, - 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */, - 1AC6FB52180E9ACB004C840B /* libjsbindings Mac.a */, - 1AC6FB54180E9ACB004C840B /* libluabindings Mac.a */, - 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */, - 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */, - 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */, - 1AC6FB5C180E9ACB004C840B /* libbox2d iOS.a */, - 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */, - 1AC6FB60180E9ACB004C840B /* libjsbindings iOS.a */, - 1AC6FB62180E9ACB004C840B /* libluabindings iOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 5091732E17ECDF8A00D62437 /* Icons */ = { - isa = PBXGroup; - children = ( - 5091731417ECDF7A00D62437 /* Icon-29.png */, - 5091731517ECDF7A00D62437 /* Icon-40.png */, - 5091731617ECDF7A00D62437 /* Icon-50.png */, - 5091731717ECDF7A00D62437 /* Icon-58.png */, - 5091731817ECDF7A00D62437 /* Icon-80.png */, - 5091731917ECDF7A00D62437 /* Icon-100.png */, - 509D4AB017EBB2AB00697056 /* Icon-57.png */, - 509D4AB117EBB2AB00697056 /* Icon-72.png */, - 509D4AB217EBB2AB00697056 /* Icon-76.png */, - 509D4AB317EBB2AB00697056 /* Icon-114.png */, - 509D4AB417EBB2AB00697056 /* Icon-120.png */, - 509D4AB517EBB2AB00697056 /* Icon-144.png */, - 509D4AB617EBB2AB00697056 /* Icon-152.png */, - ); - name = Icons; - sourceTree = ""; - }; - 509D4ACA17EBB2BE00697056 /* mac */ = { - isa = PBXGroup; - children = ( - 509D4ACB17EBB2BE00697056 /* Icon.icns */, - 509D4ACC17EBB2BE00697056 /* Info.plist */, - 509D4ACD17EBB2BE00697056 /* main.cpp */, - 509D4ACE17EBB2BE00697056 /* Prefix.pch */, - ); - path = mac; - sourceTree = ""; - }; - A92275321517C094001B78AA = { - isa = PBXGroup; - children = ( - 15FD5C6D183A6189005CFF55 /* jsb_cocos2d_gui.js */, - 15FD5C6E183A6189005CFF55 /* jsb_cocos2d_studio.js */, - 15FD5C69183A6170005CFF55 /* jsb_cocos2d_gui.js */, - 15FD5C6A183A6170005CFF55 /* jsb_cocos2d_studio.js */, - 15FD5C67183A6112005CFF55 /* cocos2d-jsb.js */, - 15FD5C5F183A60FE005CFF55 /* cocos2d-jsb.js */, - 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */, - D4545214156E28EF00887EB5 /* Classes */, - A92275401517C094001B78AA /* Frameworks */, - D45446CC156DE73F00887EB5 /* ios */, - 1A6767EC180E9AF00076BC67 /* JS Common */, - 509D4ACA17EBB2BE00697056 /* mac */, - A922753E1517C094001B78AA /* Products */, - 15628F5B15F0F5C2000CF24B /* Resources */, - ); - sourceTree = ""; - }; - A922753E1517C094001B78AA /* Products */ = { - isa = PBXGroup; - children = ( - A922753D1517C094001B78AA /* HelloJavascript iOS.app */, - 509D4AAA17EBB24E00697056 /* HelloJavascript Mac.app */, - ); - name = Products; - sourceTree = ""; - }; - A92275401517C094001B78AA /* Frameworks */ = { - isa = PBXGroup; - children = ( - D6B061231803AB9F0077942B /* CoreMotion.framework */, - 502380DB17EBB88200990C9B /* libcurl.dylib */, - 509D4AEA17EBB82600697056 /* IOKit.framework */, - 509D4AE817EBB82000697056 /* AppKit.framework */, - 509D4AE617EBB81800697056 /* OpenGL.framework */, - 1A96A4F2174A3432008653A9 /* libcurl.a */, - 1A82F5FA169AC92500C4B13A /* libsqlite3.dylib */, - D454520B156E22BD00887EB5 /* libz.dylib */, - A92275411517C094001B78AA /* QuartzCore.framework */, - A92275431517C094001B78AA /* OpenGLES.framework */, - A92275451517C094001B78AA /* OpenAL.framework */, - A92275471517C094001B78AA /* AudioToolbox.framework */, - A92275491517C094001B78AA /* AVFoundation.framework */, - A922754B1517C094001B78AA /* UIKit.framework */, - A922754D1517C094001B78AA /* Foundation.framework */, - A922754F1517C094001B78AA /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - D45446CC156DE73F00887EB5 /* ios */ = { - isa = PBXGroup; - children = ( - 509D4AAB17EBB2AB00697056 /* AppController.h */, - 509D4AAC17EBB2AB00697056 /* AppController.mm */, - 509D4AAD17EBB2AB00697056 /* Default-568h@2x.png */, - 509D4AAE17EBB2AB00697056 /* Default.png */, - 509D4AAF17EBB2AB00697056 /* Default@2x.png */, - 5091732E17ECDF8A00D62437 /* Icons */, - 509D4AB717EBB2AB00697056 /* Info.plist */, - 509D4AB817EBB2AB00697056 /* main.m */, - 509D4AB917EBB2AB00697056 /* Prefix.pch */, - 509D4ABA17EBB2AB00697056 /* RootViewController.h */, - 509D4ABB17EBB2AB00697056 /* RootViewController.mm */, - ); - name = ios; - sourceTree = ""; - }; - D4545214156E28EF00887EB5 /* Classes */ = { - isa = PBXGroup; - children = ( - D4545215156E28EF00887EB5 /* AppDelegate.cpp */, - D4545216156E28EF00887EB5 /* AppDelegate.h */, - ); - name = Classes; - path = ../Classes; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 509D4A7517EBB24E00697056 /* HelloJavascript Mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript Mac" */; - buildPhases = ( - 509D4A8017EBB24E00697056 /* Sources */, - 509D4A8217EBB24E00697056 /* Frameworks */, - 509D4A9317EBB24E00697056 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1A676820180E9BF70076BC67 /* PBXTargetDependency */, - 1A676822180E9BF70076BC67 /* PBXTargetDependency */, - 1A676824180E9BF70076BC67 /* PBXTargetDependency */, - 1A676826180E9BF70076BC67 /* PBXTargetDependency */, - 1A676828180E9BF70076BC67 /* PBXTargetDependency */, - ); - name = "HelloJavascript Mac"; - productName = HelloJavascript; - productReference = 509D4AAA17EBB24E00697056 /* HelloJavascript Mac.app */; - productType = "com.apple.product-type.application"; - }; - A922753C1517C094001B78AA /* HelloJavascript iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript iOS" */; - buildPhases = ( - A92275391517C094001B78AA /* Sources */, - A922753A1517C094001B78AA /* Frameworks */, - A922753B1517C094001B78AA /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - 1A67682F180E9C110076BC67 /* PBXTargetDependency */, - 1A676831180E9C110076BC67 /* PBXTargetDependency */, - 1A676833180E9C110076BC67 /* PBXTargetDependency */, - 1A676835180E9C110076BC67 /* PBXTargetDependency */, - 1A676837180E9C110076BC67 /* PBXTargetDependency */, - ); - name = "HelloJavascript iOS"; - productName = HelloJavascript; - productReference = A922753D1517C094001B78AA /* HelloJavascript iOS.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - A92275341517C094001B78AA /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - TargetAttributes = { - A922753C1517C094001B78AA = { - DevelopmentTeam = MDDB52YB8L; - }; - }; - }; - buildConfigurationList = A92275371517C094001B78AA /* Build configuration list for PBXProject "HelloJavascript" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = A92275321517C094001B78AA; - productRefGroup = A922753E1517C094001B78AA /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 1AC6FB35180E9ACB004C840B /* Products */; - ProjectRef = 1AC6FB34180E9ACB004C840B /* cocos2d_libs.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - A922753C1517C094001B78AA /* HelloJavascript iOS */, - 509D4A7517EBB24E00697056 /* HelloJavascript Mac */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 1AC6FB48180E9ACB004C840B /* libcocos2dx Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx Mac.a"; - remoteRef = 1AC6FB47180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB4A180E9ACB004C840B /* libcocos2dx-extensions Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx-extensions Mac.a"; - remoteRef = 1AC6FB49180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB4C180E9ACB004C840B /* libchipmunk Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libchipmunk Mac.a"; - remoteRef = 1AC6FB4B180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB4E180E9ACB004C840B /* libbox2d Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libbox2d Mac.a"; - remoteRef = 1AC6FB4D180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB50180E9ACB004C840B /* libCocosDenshion Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libCocosDenshion Mac.a"; - remoteRef = 1AC6FB4F180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB52180E9ACB004C840B /* libjsbindings Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsbindings Mac.a"; - remoteRef = 1AC6FB51180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB54180E9ACB004C840B /* libluabindings Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libluabindings Mac.a"; - remoteRef = 1AC6FB53180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB56180E9ACB004C840B /* libcocos2dx iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx iOS.a"; - remoteRef = 1AC6FB55180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB58180E9ACB004C840B /* libcocos2dx-extensions iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx-extensions iOS.a"; - remoteRef = 1AC6FB57180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB5A180E9ACB004C840B /* libchipmunk iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libchipmunk iOS.a"; - remoteRef = 1AC6FB59180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB5C180E9ACB004C840B /* libbox2d iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libbox2d iOS.a"; - remoteRef = 1AC6FB5B180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB5E180E9ACB004C840B /* libCocosDenshion iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libCocosDenshion iOS.a"; - remoteRef = 1AC6FB5D180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB60180E9ACB004C840B /* libjsbindings iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsbindings iOS.a"; - remoteRef = 1AC6FB5F180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 1AC6FB62180E9ACB004C840B /* libluabindings iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libluabindings iOS.a"; - remoteRef = 1AC6FB61180E9ACB004C840B /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 509D4A9317EBB24E00697056 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 15FD5C6B183A6170005CFF55 /* jsb_cocos2d_gui.js in Resources */, - 15FD5C6C183A6170005CFF55 /* jsb_cocos2d_studio.js in Resources */, - 15FD5C68183A6112005CFF55 /* cocos2d-jsb.js in Resources */, - 1A67683E180E9CE90076BC67 /* jsb_chipmunk_constants.js in Resources */, - 1A67683F180E9CE90076BC67 /* jsb_chipmunk.js in Resources */, - 1A676840180E9CE90076BC67 /* jsb_cocos2d_constants.js in Resources */, - 1A676841180E9CE90076BC67 /* jsb_cocos2d_extension.js in Resources */, - 1A676842180E9CE90076BC67 /* jsb_cocos2d.js in Resources */, - 1A676843180E9CE90076BC67 /* jsb_cocosbuilder.js in Resources */, - 1A676844180E9CE90076BC67 /* jsb_debugger.js in Resources */, - 1A676845180E9CE90076BC67 /* jsb_deprecated.js in Resources */, - 1A676846180E9CE90076BC67 /* jsb_opengl_constants.js in Resources */, - 1A676847180E9CE90076BC67 /* jsb_opengl.js in Resources */, - 1A676848180E9CE90076BC67 /* jsb_sys.js in Resources */, - 1A676849180E9CE90076BC67 /* jsb.js in Resources */, - 509D4ACF17EBB2BE00697056 /* Icon.icns in Resources */, - 509D4AA517EBB24E00697056 /* res in Resources */, - 509D4AA617EBB24E00697056 /* src in Resources */, - 1A6767FB180E9B160076BC67 /* debugger in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A922753B1517C094001B78AA /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 15FD5C6F183A618A005CFF55 /* jsb_cocos2d_gui.js in Resources */, - 15FD5C70183A618A005CFF55 /* jsb_cocos2d_studio.js in Resources */, - 15FD5C60183A60FE005CFF55 /* cocos2d-jsb.js in Resources */, - 1A67684A180E9CF10076BC67 /* jsb_chipmunk_constants.js in Resources */, - 1A67684B180E9CF10076BC67 /* jsb_chipmunk.js in Resources */, - 1A67684C180E9CF10076BC67 /* jsb_cocos2d_constants.js in Resources */, - 1A67684D180E9CF10076BC67 /* jsb_cocos2d_extension.js in Resources */, - 1A67684E180E9CF10076BC67 /* jsb_cocos2d.js in Resources */, - 1A67684F180E9CF10076BC67 /* jsb_cocosbuilder.js in Resources */, - 1A676850180E9CF10076BC67 /* jsb_debugger.js in Resources */, - 1A676851180E9CF10076BC67 /* jsb_deprecated.js in Resources */, - 1A676852180E9CF10076BC67 /* jsb_opengl_constants.js in Resources */, - 1A676853180E9CF10076BC67 /* jsb_opengl.js in Resources */, - 1A676854180E9CF10076BC67 /* jsb_sys.js in Resources */, - 1A676855180E9CF10076BC67 /* jsb.js in Resources */, - 509D4ABE17EBB2AB00697056 /* Default.png in Resources */, - 5091731E17ECDF7A00D62437 /* Icon-80.png in Resources */, - 5091731F17ECDF7A00D62437 /* Icon-100.png in Resources */, - 509D4AC117EBB2AB00697056 /* Icon-72.png in Resources */, - 509D4AC017EBB2AB00697056 /* Icon-57.png in Resources */, - 5091731A17ECDF7A00D62437 /* Icon-29.png in Resources */, - 509D4AC617EBB2AB00697056 /* Icon-152.png in Resources */, - 509D4AC517EBB2AB00697056 /* Icon-144.png in Resources */, - 509D4AC317EBB2AB00697056 /* Icon-114.png in Resources */, - 509D4ABD17EBB2AB00697056 /* Default-568h@2x.png in Resources */, - 509D4ABF17EBB2AB00697056 /* Default@2x.png in Resources */, - 509D4AC217EBB2AB00697056 /* Icon-76.png in Resources */, - 5091731B17ECDF7A00D62437 /* Icon-40.png in Resources */, - 1AE4B40416D1FECD003C6D1C /* res in Resources */, - 5091731C17ECDF7A00D62437 /* Icon-50.png in Resources */, - 509D4AC417EBB2AB00697056 /* Icon-120.png in Resources */, - 1AE4B40516D1FECD003C6D1C /* src in Resources */, - 5091731D17ECDF7A00D62437 /* Icon-58.png in Resources */, - 1A6767FA180E9B160076BC67 /* debugger in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 509D4A8017EBB24E00697056 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 509D4AD117EBB2BE00697056 /* main.cpp in Sources */, - 509D4A8117EBB24E00697056 /* AppDelegate.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - A92275391517C094001B78AA /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 509D4AC917EBB2AB00697056 /* RootViewController.mm in Sources */, - D4545227156E28EF00887EB5 /* AppDelegate.cpp in Sources */, - 509D4AC817EBB2AB00697056 /* main.m in Sources */, - 509D4ABC17EBB2AB00697056 /* AppController.mm in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin PBXTargetDependency section */ - 1A676820180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx Mac"; - targetProxy = 1A67681F180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676822180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx-extensions Mac"; - targetProxy = 1A676821180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676824180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "chipmunk Mac"; - targetProxy = 1A676823180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676826180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "CocosDenshion Mac"; - targetProxy = 1A676825180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A676828180E9BF70076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "jsbindings Mac"; - targetProxy = 1A676827180E9BF70076BC67 /* PBXContainerItemProxy */; - }; - 1A67682F180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx iOS"; - targetProxy = 1A67682E180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676831180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "cocos2dx-extensions iOS"; - targetProxy = 1A676830180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676833180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "chipmunk iOS"; - targetProxy = 1A676832180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676835180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "CocosDenshion iOS"; - targetProxy = 1A676834180E9C110076BC67 /* PBXContainerItemProxy */; - }; - 1A676837180E9C110076BC67 /* PBXTargetDependency */ = { - isa = PBXTargetDependency; - name = "jsbindings iOS"; - targetProxy = 1A676836180E9C110076BC67 /* PBXContainerItemProxy */; - }; -/* End PBXTargetDependency section */ - -/* Begin XCBuildConfiguration section */ - 509D4AA817EBB24E00697056 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = mac/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_MAC, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/mac", - "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", - ); - INFOPLIST_FILE = mac/Info.plist; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = macosx; - }; - name = Debug; - }; - 509D4AA917EBB24E00697056 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = mac/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_MAC, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/mac", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/mac", - "$(SRCROOT)/../cocos2d/external/glfw3/include/mac", - ); - INFOPLIST_FILE = mac/Info.plist; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = macosx; - }; - name = Release; - }; - A92276FE1517C097001B78AA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - "COCOS2D_DEBUG=1", - USE_FILE32API, - COCOS2D_JAVASCRIPT, - CC_ENABLE_CHIPMUNK_INTEGRATION, - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../cocos2d", - "$(SRCROOT)/../cocos2d/cocos", - "$(SRCROOT)/../cocos2d/cocos/base", - "$(SRCROOT)/../cocos2d/cocos/physics", - "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", - "$(SRCROOT)/../cocos2d/cocos/2d", - "$(SRCROOT)/../cocos2d/cocos/gui", - "$(SRCROOT)/../cocos2d/cocos/network", - "$(SRCROOT)/../cocos2d/cocos/audio/include", - "$(SRCROOT)/../cocos2d/cocos/editor-support", - "$(SRCROOT)/../cocos2d/cocos/scripting/javascript/bindings", - "$(SRCROOT)/../cocos2d/cocos/scripting/auto-generated/js-bindings", - "$(SRCROOT)/../cocos2d/extensions", - "$(SRCROOT)/../cocos2d/external", - "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", - ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - A92276FF1517C097001B78AA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = ( - NDEBUG, - USE_FILE32API, - COCOS2D_JAVASCRIPT, - CC_ENABLE_CHIPMUNK_INTEGRATION, - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "$(SRCROOT)/../cocos2d", - "$(SRCROOT)/../cocos2d/cocos", - "$(SRCROOT)/../cocos2d/cocos/base", - "$(SRCROOT)/../cocos2d/cocos/physics", - "$(SRCROOT)/../cocos2d/cocos/math/kazmath/include", - "$(SRCROOT)/../cocos2d/cocos/2d", - "$(SRCROOT)/../cocos2d/cocos/gui", - "$(SRCROOT)/../cocos2d/cocos/network", - "$(SRCROOT)/../cocos2d/cocos/audio/include", - "$(SRCROOT)/../cocos2d/cocos/editor-support", - "$(SRCROOT)/../cocos2d/cocos/scripting/javascript/bindings", - "$(SRCROOT)/../cocos2d/cocos/scripting/auto-generated/js-bindings", - "$(SRCROOT)/../cocos2d/extensions", - "$(SRCROOT)/../cocos2d/external", - "$(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk", - ); - IPHONEOS_DEPLOYMENT_TARGET = 5.1; - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - A92277011517C097001B78AA /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COMPRESS_PNG_FILES = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_IPHONE, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/ios", - ); - INFOPLIST_FILE = ios/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Debug; - }; - A92277021517C097001B78AA /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COMPRESS_PNG_FILES = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_IPHONE, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ( - "$(inherited)", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios", - "$(SRCROOT)/../cocos2d/cocos/2d/platform/ios/Simulation", - "$(SRCROOT)/../cocos2d/external/spidermonkey/include/ios", - ); - INFOPLIST_FILE = ios/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 509D4AA717EBB24E00697056 /* Build configuration list for PBXNativeTarget "HelloJavascript Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 509D4AA817EBB24E00697056 /* Debug */, - 509D4AA917EBB24E00697056 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A92275371517C094001B78AA /* Build configuration list for PBXProject "HelloJavascript" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A92276FE1517C097001B78AA /* Debug */, - A92276FF1517C097001B78AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - A92277001517C097001B78AA /* Build configuration list for PBXNativeTarget "HelloJavascript iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - A92277011517C097001B78AA /* Debug */, - A92277021517C097001B78AA /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = A92275341517C094001B78AA /* Project object */; -} diff --git a/templates/multi-platform-js/proj.ios_mac/ios/AppController.h b/templates/multi-platform-js/proj.ios_mac/ios/AppController.h deleted file mode 100644 index 09f2084880..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/AppController.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. -****************************************************************************/ - -@class RootViewController; - -@interface AppController : NSObject { - UIWindow *window; - RootViewController *viewController; -} - -@end - diff --git a/templates/multi-platform-js/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-js/proj.ios_mac/ios/AppController.mm deleted file mode 100644 index 06d659ddcf..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/AppController.mm +++ /dev/null @@ -1,145 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -#import -#import "AppController.h" -#import "cocos2d.h" -#import "CCEAGLView.h" -#import "AppDelegate.h" - -#import "RootViewController.h" - -@implementation AppController - -#pragma mark - -#pragma mark Application lifecycle - -// cocos2d application instance -static AppDelegate s_sharedApplication; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - - // Override point for customization after application launch. - - // Add the view controller's view to the window and display. - window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] - pixelFormat: kEAGLColorFormatRGBA8 - depthFormat: GL_DEPTH_COMPONENT16 //_OES - preserveBackbuffer: NO - sharegroup: nil - multiSampling: NO - numberOfSamples: 0 ]; - - [eaglView setMultipleTouchEnabled:YES]; - - // Use RootViewController manage CCEAGLView - viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; - viewController.wantsFullScreenLayout = YES; - viewController.view = eaglView; - - // Set RootViewController to window - if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) - { - // warning: addSubView doesn't work on iOS6 - [window addSubview: viewController.view]; - } - else - { - // use this method on ios6 - [window setRootViewController:viewController]; - } - - [window makeKeyAndVisible]; - - [[UIApplication sharedApplication] setStatusBarHidden: YES]; - - // IMPORTANT: Setting the GLView should be done after creating the RootViewController - cocos2d::GLView *glview = cocos2d::GLView::createWithEAGLView(eaglView); - cocos2d::Director::getInstance()->setOpenGLView(glview); - - cocos2d::Application::getInstance()->run(); - return YES; -} - - -- (void)applicationWillResignActive:(UIApplication *)application { - /* - Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - */ - //We don't need to call this method any more. It will interupt user defined game pause&resume logic - /* cocos2d::Director::getInstance()->pause(); */ -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - /* - Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - */ - //We don't need to call this method any more. It will interupt user defined game pause&resume logic - /* cocos2d::Director::getInstance()->resume(); */ -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - If your application supports background execution, called instead of applicationWillTerminate: when the user quits. - */ - cocos2d::Application::getInstance()->applicationDidEnterBackground(); -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - /* - Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. - */ - cocos2d::Application::getInstance()->applicationWillEnterForeground(); -} - -- (void)applicationWillTerminate:(UIApplication *)application { - /* - Called when the application is about to terminate. - See also applicationDidEnterBackground:. - */ -} - - -#pragma mark - -#pragma mark Memory management - -- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { - /* - Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. - */ - cocos2d::Director::getInstance()->purgeCachedData(); -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end - diff --git a/templates/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id deleted file mode 100644 index 8f5838f3a8..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -66c6d1cead373b45218424f6a82f370897e443e4 \ No newline at end of file diff --git a/templates/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id deleted file mode 100644 index 8843505b20..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -84689888a14a2123d2b39f7f2f61be8c15207479 \ No newline at end of file diff --git a/templates/multi-platform-js/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-js/proj.ios_mac/ios/Prefix.pch deleted file mode 100644 index 168ddec406..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'HelloJavascript' target in the 'HelloJavascript' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.h deleted file mode 100644 index a68782316e..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.h +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -#import - - -@interface RootViewController : UIViewController { - -} -- (BOOL)prefersStatusBarHidden; -@end diff --git a/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.mm deleted file mode 100644 index 2374fae2d2..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/RootViewController.mm +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -#import "RootViewController.h" -#import "cocos2d.h" -#import "CCEAGLView.h" - -@implementation RootViewController - -/* - // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { - // Custom initialization - } - return self; -} -*/ - -/* -// Implement loadView to create a view hierarchy programmatically, without using a nib. -- (void)loadView { -} -*/ - -/* -// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. -- (void)viewDidLoad { - [super viewDidLoad]; -} - -*/ -// Override to allow orientations other than the default portrait orientation. -// This method is deprecated on ios6 -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return UIInterfaceOrientationIsLandscape( interfaceOrientation ); -} - -// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead -- (NSUInteger) supportedInterfaceOrientations{ -#ifdef __IPHONE_6_0 - return UIInterfaceOrientationMaskAllButUpsideDown; -#endif -} - -- (BOOL) shouldAutorotate { - return YES; -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - - cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); - - CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); - - cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); -} - -//fix not hide status on ios7 -- (BOOL)prefersStatusBarHidden -{ - return YES; -} - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end diff --git a/templates/multi-platform-js/proj.ios_mac/ios/main.m b/templates/multi-platform-js/proj.ios_mac/ios/main.m deleted file mode 100644 index b1286e31be..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/ios/main.m +++ /dev/null @@ -1,11 +0,0 @@ - - -#import - -int main(int argc, char *argv[]) { - - NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); - [pool release]; - return retVal; -} diff --git a/templates/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id deleted file mode 100644 index 0c90afdb6d..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/mac/Icon.icns.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -2040fc6fe624353ae1d3db50cd3d450f4fda5afc \ No newline at end of file diff --git a/templates/multi-platform-js/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-js/proj.ios_mac/mac/Prefix.pch deleted file mode 100644 index 46c36a7e99..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/mac/Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/templates/multi-platform-js/proj.ios_mac/mac/main.cpp b/templates/multi-platform-js/proj.ios_mac/mac/main.cpp deleted file mode 100644 index 2d47ac9192..0000000000 --- a/templates/multi-platform-js/proj.ios_mac/mac/main.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "AppDelegate.h" -#include "cocos2d.h" - -USING_NS_CC; - -int main(int argc, char *argv[]) -{ - AppDelegate app; - return Application::getInstance()->run(); -} diff --git a/templates/multi-platform-js/proj.linux/main.cpp b/templates/multi-platform-js/proj.linux/main.cpp deleted file mode 100644 index c5b735da78..0000000000 --- a/templates/multi-platform-js/proj.linux/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "../Classes/AppDelegate.h" - -#include -#include -#include -#include - -USING_NS_CC; - -int main(int argc, char **argv) -{ - // create the application instance - AppDelegate app; - return Application::getInstance()->run(); -} diff --git a/templates/multi-platform-js/proj.win32/HelloJavascript.sln b/templates/multi-platform-js/proj.win32/HelloJavascript.sln deleted file mode 100644 index 05d76f1c83..0000000000 --- a/templates/multi-platform-js/proj.win32/HelloJavascript.sln +++ /dev/null @@ -1,90 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloJavascript", "HelloJavascript.vcxproj", "{3B0B58B1-2734-488E-A542-ECEC11EB2455}" - ProjectSection(ProjectDependencies) = postProject - {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} - {39379840-825A-45A0-B363-C09FFEF864BD} = {39379840-825A-45A0-B363-C09FFEF864BD} - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" - ProjectSection(ProjectDependencies) = postProject - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBinding", "..\cocos2d\cocos\scripting\javascript\bindings\proj.win32\libJSBinding.vcxproj", "{39379840-825A-45A0-B363-C09FFEF864BD}" - ProjectSection(ProjectDependencies) = postProject - {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForChipmunk", "..\cocos2d\cocos\scripting\javascript\bindings\chipmunk\libJSBindingForChipmunk.vcxproj", "{21070E58-EEC6-4E16-8B4F-6D083DF55790}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libLocalStorage", "..\cocos2d\cocos\storage\local-storage\proj.win32\libLocalStorage.vcxproj", "{632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForLocalStorage", "..\cocos2d\cocos\scripting\javascript\bindings\localstorage\libJSBindingForLocalStorage.vcxproj", "{68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libJSBindingForExtension", "..\cocos2d\cocos\scripting\javascript\bindings\extension\libJSBindingForExtension.vcxproj", "{625F7391-9A91-48A1-8CFC-79508C822637}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Debug|Win32.ActiveCfg = Debug|Win32 - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Debug|Win32.Build.0 = Debug|Win32 - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Release|Win32.ActiveCfg = Release|Win32 - {3B0B58B1-2734-488E-A542-ECEC11EB2455}.Release|Win32.Build.0 = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.ActiveCfg = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Debug|Win32.Build.0 = Debug|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.ActiveCfg = Release|Win32 - {39379840-825A-45A0-B363-C09FFEF864BD}.Release|Win32.Build.0 = Release|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.ActiveCfg = Debug|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Debug|Win32.Build.0 = Debug|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.ActiveCfg = Release|Win32 - {21070E58-EEC6-4E16-8B4F-6D083DF55790}.Release|Win32.Build.0 = Release|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.ActiveCfg = Debug|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Debug|Win32.Build.0 = Debug|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.ActiveCfg = Release|Win32 - {632A8F38-D0F0-4D22-86B3-D69F5E6BF63A}.Release|Win32.Build.0 = Release|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.ActiveCfg = Debug|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Debug|Win32.Build.0 = Debug|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.ActiveCfg = Release|Win32 - {68F5F371-BD7B-4C30-AE5B-0B08F22E0CDE}.Release|Win32.Build.0 = Release|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.ActiveCfg = Debug|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Debug|Win32.Build.0 = Debug|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.ActiveCfg = Release|Win32 - {625F7391-9A91-48A1-8CFC-79508C822637}.Release|Win32.Build.0 = Release|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj b/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj deleted file mode 100644 index a3b73dc491..0000000000 --- a/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj +++ /dev/null @@ -1,218 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {3B0B58B1-2734-488E-A542-ECEC11EB2455} - HelloJavascript - - - - Application - Unicode - v100 - v110 - v110_xp - - - Application - Unicode - v100 - v110 - v110_xp - - - - - - - - - - - - - - - - - <_ProjectFileVersion>10.0.40219.1 - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - AllRules.ruleset - - - AllRules.ruleset - - - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - - _DEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)game.tlb - game.h - - - game_i.c - game_p.c - - - Disabled - $(ProjectDir)..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\javascript\bindings;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;_DEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_DEBUG=1;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - false - EnableFastChecks - MultiThreadedDebugDLL - - - Level3 - EditAndContinue - 4267;4251;4244;%(DisableSpecificWarnings) - true - - - _DEBUG;%(PreprocessorDefinitions) - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(EngineRoot)external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" - - - libcurl_imp.lib;mozjs-27.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies) - $(OutDir);%(AdditionalLibraryDirectories) - true - Windows - MachineX86 - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -if exist "$(OutDir)\HelloJavascriptRes" rd /s /q "$(OutDir)\HelloJavascriptRes" -mkdir "$(OutDir)\HelloJavascriptRes" -xcopy "$(EngineRoot)cocos\scripting\javascript\script\*.js" "$(OutDir)\HelloJavascriptRes\" /e /Y -xcopy "$(ProjectDir)..\Resources" "$(OutDir)\HelloJavascriptRes\" /e /Y - - - Copy js and resource files. - - - - - NDEBUG;%(PreprocessorDefinitions) - false - Win32 - true - $(IntDir)game.tlb - game.h - - - game_i.c - game_p.c - - - $(ProjectDir)..\Classes;$(EngineRoot);$(EngineRoot)cocos;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\javascript\bindings;$(EngineRoot)cocos\scripting\auto-generated\js-bindings;$(EngineRoot)external\spidermonkey\include\win32;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - WIN32;_WINDOWS;STRICT;NDEBUG;XP_WIN;JS_HAVE___INTN;JS_INTPTR_TYPE=int;COCOS2D_JAVASCRIPT=1;CC_ENABLE_CHIPMUNK_INTEGRATION=1;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;%(PreprocessorDefinitions) - - - MultiThreadedDLL - - - Level3 - - - 4267;4251;4244;%(DisableSpecificWarnings) - true - - - NDEBUG;%(PreprocessorDefinitions) - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(EngineRoot)external\spidermonkey\prebuilt\win32\*.*" "$(OutDir)" -xcopy /Y /Q "$(EngineRoot)external\websockets\prebuilt\win32\*.*" "$(OutDir)" - - - libcurl_imp.lib;mozjs-27.lib;ws2_32.lib;sqlite3.lib;websockets.lib;%(AdditionalDependencies) - $(OutDir);%(AdditionalLibraryDirectories) - Windows - MachineX86 - true - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -if exist "$(OutDir)\HelloJavascriptRes" rd /s /q "$(OutDir)\HelloJavascriptRes" -mkdir "$(OutDir)\HelloJavascriptRes" -xcopy "$(EngineRoot)cocos\scripting\javascript\script\*.js" "$(OutDir)\HelloJavascriptRes\" /e /Y -xcopy "$(ProjectDir)..\Resources" "$(OutDir)\HelloJavascriptRes\" /e /Y - Copy js and resource files. - - - - - - - - - - - - - - - - {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - - - {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - - - {21070e58-eec6-4e16-8b4f-6d083df55790} - - - {625f7391-9a91-48a1-8cfc-79508c822637} - - - {68f5f371-bd7b-4c30-ae5b-0b08f22e0cde} - - - {39379840-825a-45a0-b363-c09ffef864bd} - - - {632a8f38-d0f0-4d22-86b3-d69f5e6bf63a} - - - {21b2c324-891f-48ea-ad1a-5ae13de12e28} - - - {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} - - - - - - \ No newline at end of file diff --git a/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters b/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters deleted file mode 100644 index b3ec546774..0000000000 --- a/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.filters +++ /dev/null @@ -1,36 +0,0 @@ - - - - - {ca9c9e15-d942-43a1-aa7a-5f0b74ca1afd} - rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;jpg;jpeg;jpe;png;manifest - - - {ccb2323b-1cfa-41ea-bcf4-ba5f07309396} - - - {e93a77e1-af1e-4400-87d3-504b62ebdbb0} - - - - - win32 - - - Classes - - - - - Classes - - - win32 - - - - - resource - - - \ No newline at end of file diff --git a/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user b/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user deleted file mode 100644 index c6f9b6518d..0000000000 --- a/templates/multi-platform-js/proj.win32/HelloJavascript.vcxproj.user +++ /dev/null @@ -1,11 +0,0 @@ - - - - $(OutDir)\HelloJavascriptRes - WindowsLocalDebugger - - - $(OutDir)\HelloJavascriptRes - WindowsLocalDebugger - - \ No newline at end of file diff --git a/templates/multi-platform-js/proj.win32/game.rc b/templates/multi-platform-js/proj.win32/game.rc deleted file mode 100644 index 1e0a2a0da2..0000000000 --- a/templates/multi-platform-js/proj.win32/game.rc +++ /dev/null @@ -1,86 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -#endif // APSTUDIO_INVOKED - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -GLFW_ICON ICON "res\\game.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "game Module\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "game\0" - VALUE "LegalCopyright", "Copyright \0" - VALUE "OriginalFilename", "game.exe\0" - VALUE "ProductName", "game Module\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 0x04B0 - END -END - -///////////////////////////////////////////////////////////////////////////// -#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) diff --git a/templates/multi-platform-js/proj.win32/main.cpp b/templates/multi-platform-js/proj.win32/main.cpp deleted file mode 100644 index 34f40d33cf..0000000000 --- a/templates/multi-platform-js/proj.win32/main.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "main.h" -#include "AppDelegate.h" -#include "cocos2d.h" - -USING_NS_CC; - -// uncomment below line, open debug console -// #define USE_WIN32_CONSOLE - -int APIENTRY _tWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, - int nCmdShow) -{ - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - -#ifdef USE_WIN32_CONSOLE - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); -#endif - - // create the application instance - AppDelegate app; - int ret = Application::getInstance()->run(); - -#ifdef USE_WIN32_CONSOLE - FreeConsole(); -#endif - - return ret; -} diff --git a/templates/multi-platform-js/proj.win32/main.h b/templates/multi-platform-js/proj.win32/main.h deleted file mode 100644 index e29aeedb3a..0000000000 --- a/templates/multi-platform-js/proj.win32/main.h +++ /dev/null @@ -1,12 +0,0 @@ -#ifndef __MAIN_H__ -#define __MAIN_H__ - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -// Windows Header Files: -#include - -// C RunTime Header Files -#include "CCStdC.h" - -#endif // __WINMAIN_H__ diff --git a/templates/multi-platform-js/proj.win32/res/game.ico b/templates/multi-platform-js/proj.win32/res/game.ico deleted file mode 100644 index feaf932a7465e435af6271bd8204c0145731a6eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47629 zcmeHw2Ut~C_C2VmbW{*T6tMvI-cS^5*boF23l{9X7erK4RIJ#0@4ZH&F|j4F#B>vr zXks*zOomCAk(tS4`u?wV?mO>Ynu?N{`Tf7)`wsWLTh6XKz=;E-cIr zf0gWl+t}F!;#03)#`mi;?CiSXTrj?dA*CSM<39D5VjS}OKRV3LWoAUl(3zc_(`R*Y z{vf%FOUA6Ou1^Y_y5Jd8O2X&oP09GZ*-@@f=Eb-^nIG%+WI<22Ckx};pDga{{v@rR z`;(>pJ)SHd&OqnN}#(6&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YApgoFeI zBliQ-<6w>Jd+)ugd_RvLKZUs#VrugRSk z^vFj47cT3ky=y_P5m&TL8SIOyI?wpeobj}vv#(xL3Efx8@^bto0v#XHK3xfpPz8a5mZYJElE7wLN>k|9O7*m%4|zV*j`d z>gX5d7<#nz1#RbF_8mWit?AsxSjRWxx^Uq_1?yK|eT^~jX{5!l6Q0&Gpsurz@v^^P zn9mbe>`RxS#-FsIz*E;8_a&j0%{HNRus8iq~aTtZgXAK{C29qm&`%%R$R z7`eCbJ@os`&;7T2Ca(9d1%9V=lz9FJbTlUxx6$8oCNDX3m9aH%zkLl{u!jGXwhyB) zulw(=OF7^3Y2Uf`6!i3l=6QJ9z5lLjyVGs)$#v?~0WXMcZk)aoYZts+OvS%L4($8* z@ar2voBo^1et19IyqDHb9vjzndZ|6`{~dVh-*|j8_|n6hLEZHC|Au2oBio!8@#Nkb zqX(9e2N>u5H@x5Tyu;Tw14n;y#mfcu;P&&}|4ZNVKE@~Ju`TgetOpenGLView(); - if(!glview) { - glview = GLView::create("My Game"); - director->setOpenGLView(glview); - } - - glview->setDesignResolutionSize(480, 320, ResolutionPolicy::NO_BORDER); - - // turn on display FPS - director->setDisplayStats(true); - - // set FPS. the default value is 1.0/60 if you don't call this - director->setAnimationInterval(1.0 / 60); - - // register lua engine - auto engine = LuaEngine::getInstance(); - ScriptEngineManager::getInstance()->setScriptEngine(engine); - - //The call was commented because it will lead to ZeroBrane Studio can't find correct context when debugging - //engine->executeScriptFile("hello.lua"); - engine->executeString("require 'hello.lua'"); - - return true; -} - -// This function will be called when the app is inactive. When comes a phone call,it's be invoked too -void AppDelegate::applicationDidEnterBackground() -{ - Director::getInstance()->stopAnimation(); - - SimpleAudioEngine::getInstance()->pauseBackgroundMusic(); -} - -// this function will be called when the app is active again -void AppDelegate::applicationWillEnterForeground() -{ - Director::getInstance()->startAnimation(); - - SimpleAudioEngine::getInstance()->resumeBackgroundMusic(); -} diff --git a/templates/multi-platform-lua/Classes/AppDelegate.h b/templates/multi-platform-lua/Classes/AppDelegate.h deleted file mode 100644 index 5cf478d052..0000000000 --- a/templates/multi-platform-lua/Classes/AppDelegate.h +++ /dev/null @@ -1,38 +0,0 @@ -#ifndef __APP_DELEGATE_H__ -#define __APP_DELEGATE_H__ - -#include "cocos2d.h" - -/** -@brief The cocos2d Application. - -The reason for implement as private inheritance is to hide some interface call by Director. -*/ -class AppDelegate : private cocos2d::Application -{ -public: - AppDelegate(); - virtual ~AppDelegate(); - - /** - @brief Implement Director and Scene init code here. - @return true Initialize success, app continue. - @return false Initialize failed, app terminate. - */ - virtual bool applicationDidFinishLaunching(); - - /** - @brief The function be called when the application enter background - @param the pointer of the application - */ - virtual void applicationDidEnterBackground(); - - /** - @brief The function be called when the application enter foreground - @param the pointer of the application - */ - virtual void applicationWillEnterForeground(); -}; - -#endif // __APP_DELEGATE_H__ - diff --git a/templates/multi-platform-lua/Resources/background.mp3.REMOVED.git-id b/templates/multi-platform-lua/Resources/background.mp3.REMOVED.git-id deleted file mode 100644 index cfc16a8a4e..0000000000 --- a/templates/multi-platform-lua/Resources/background.mp3.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -aec1c0a8c8068377fddca5ddd32084d8c3c3c419 \ No newline at end of file diff --git a/templates/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id b/templates/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id deleted file mode 100644 index 4609f3cf02..0000000000 --- a/templates/multi-platform-lua/Resources/farm.jpg.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -d7290c34702d1c6bdb368acb060d93b42d5deff8 \ No newline at end of file diff --git a/templates/multi-platform-lua/Resources/hello.lua b/templates/multi-platform-lua/Resources/hello.lua deleted file mode 100644 index 770e922c9d..0000000000 --- a/templates/multi-platform-lua/Resources/hello.lua +++ /dev/null @@ -1,209 +0,0 @@ -require "Cocos2d" --- cclog -cclog = function(...) - print(string.format(...)) -end - --- for CCLuaEngine traceback -function __G__TRACKBACK__(msg) - cclog("----------------------------------------") - cclog("LUA ERROR: " .. tostring(msg) .. "\n") - cclog(debug.traceback()) - cclog("----------------------------------------") -end - -local function main() - -- avoid memory leak - collectgarbage("setpause", 100) - collectgarbage("setstepmul", 5000) - - --support debug - local targetPlatform = cc.Application:getInstance():getTargetPlatform() - if (cc.PLATFORM_OS_IPHONE == targetPlatform) or (cc.PLATFORM_OS_IPAD == targetPlatform) or - (cc.PLATFORM_OS_ANDROID == targetPlatform) or (cc.PLATFORM_OS_WINDOWS == targetPlatform) or - (cc.PLATFORM_OS_MAC == targetPlatform) then - local host = 'localhost' -- please change localhost to your PC's IP for on-device debugging - require('mobdebug').start(host) - end - require "hello2" - cclog("result is " .. myadd(1, 1)) - - --------------- - - local visibleSize = cc.Director:getInstance():getVisibleSize() - local origin = cc.Director:getInstance():getVisibleOrigin() - - -- add the moving dog - local function creatDog() - local frameWidth = 105 - local frameHeight = 95 - - -- create dog animate - local textureDog = cc.TextureCache:getInstance():addImage("dog.png") - local rect = cc.rect(0, 0, frameWidth, frameHeight) - local frame0 = cc.SpriteFrame:createWithTexture(textureDog, rect) - rect = cc.rect(frameWidth, 0, frameWidth, frameHeight) - local frame1 = cc.SpriteFrame:createWithTexture(textureDog, rect) - - local spriteDog = cc.Sprite:createWithSpriteFrame(frame0) - spriteDog.isPaused = false - spriteDog:setPosition(origin.x, origin.y + visibleSize.height / 4 * 3) ---[[ - local animFrames = CCArray:create() - - animFrames:addObject(frame0) - animFrames:addObject(frame1) -]]-- - - local animation = cc.Animation:createWithSpriteFrames({frame0,frame1}, 0.5) - local animate = cc.Animate:create(animation); - spriteDog:runAction(cc.RepeatForever:create(animate)) - - -- moving dog at every frame - local function tick() - if spriteDog.isPaused then return end - local x, y = spriteDog:getPosition() - if x > origin.x + visibleSize.width then - x = origin.x - else - x = x + 1 - end - - spriteDog:setPositionX(x) - end - - cc.Director:getInstance():getScheduler():scheduleScriptFunc(tick, 0, false) - - return spriteDog - end - - -- create farm - local function createLayerFarm() - local layerFarm = cc.Layer:create() - - -- add in farm background - local bg = cc.Sprite:create("farm.jpg") - bg:setPosition(origin.x + visibleSize.width / 2 + 80, origin.y + visibleSize.height / 2) - layerFarm:addChild(bg) - - -- add land sprite - for i = 0, 3 do - for j = 0, 1 do - local spriteLand = cc.Sprite:create("land.png") - spriteLand:setPosition(200 + j * 180 - i % 2 * 90, 10 + i * 95 / 2) - layerFarm:addChild(spriteLand) - end - end - - -- add crop - local frameCrop = cc.SpriteFrame:create("crop.png", cc.rect(0, 0, 105, 95)) - for i = 0, 3 do - for j = 0, 1 do - local spriteCrop = cc.Sprite:createWithSpriteFrame(frameCrop); - spriteCrop:setPosition(10 + 200 + j * 180 - i % 2 * 90, 30 + 10 + i * 95 / 2) - layerFarm:addChild(spriteCrop) - end - end - - -- add moving dog - local spriteDog = creatDog() - layerFarm:addChild(spriteDog) - - -- handing touch events - local touchBeginPoint = nil - local function onTouchBegan(touch, event) - local location = touch:getLocation() - cclog("onTouchBegan: %0.2f, %0.2f", location.x, location.y) - touchBeginPoint = {x = location.x, y = location.y} - spriteDog.isPaused = true - -- CCTOUCHBEGAN event must return true - return true - end - - local function onTouchMoved(touch, event) - local location = touch:getLocation() - cclog("onTouchMoved: %0.2f, %0.2f", location.x, location.y) - if touchBeginPoint then - local cx, cy = layerFarm:getPosition() - layerFarm:setPosition(cx + location.x - touchBeginPoint.x, - cy + location.y - touchBeginPoint.y) - touchBeginPoint = {x = location.x, y = location.y} - end - end - - local function onTouchEnded(touch, event) - local location = touch:getLocation() - cclog("onTouchEnded: %0.2f, %0.2f", location.x, location.y) - touchBeginPoint = nil - spriteDog.isPaused = false - end - - local listener = cc.EventListenerTouchOneByOne:create() - listener:registerScriptHandler(onTouchBegan,cc.Handler.EVENT_TOUCH_BEGAN ) - listener:registerScriptHandler(onTouchMoved,cc.Handler.EVENT_TOUCH_MOVED ) - listener:registerScriptHandler(onTouchEnded,cc.Handler.EVENT_TOUCH_ENDED ) - local eventDispatcher = layerFarm:getEventDispatcher() - eventDispatcher:addEventListenerWithSceneGraphPriority(listener, layerFarm) - - return layerFarm - end - - - -- create menu - local function createLayerMenu() - local layerMenu = cc.Layer:create() - - local menuPopup, menuTools, effectID - - local function menuCallbackClosePopup() - -- stop test sound effect - cc.SimpleAudioEngine:getInstance():stopEffect(effectID) - menuPopup:setVisible(false) - end - - local function menuCallbackOpenPopup() - -- loop test sound effect - local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav") - effectID = cc.SimpleAudioEngine:getInstance():playEffect(effectPath) - menuPopup:setVisible(true) - end - - -- add a popup menu - local menuPopupItem = cc.MenuItemImage:create("menu2.png", "menu2.png") - menuPopupItem:setPosition(0, 0) - menuPopupItem:registerScriptTapHandler(menuCallbackClosePopup) - menuPopup = cc.Menu:create(menuPopupItem) - menuPopup:setPosition(origin.x + visibleSize.width / 2, origin.y + visibleSize.height / 2) - menuPopup:setVisible(false) - layerMenu:addChild(menuPopup) - - -- add the left-bottom "tools" menu to invoke menuPopup - local menuToolsItem = cc.MenuItemImage:create("menu1.png", "menu1.png") - menuToolsItem:setPosition(0, 0) - menuToolsItem:registerScriptTapHandler(menuCallbackOpenPopup) - menuTools = cc.Menu:create(menuToolsItem) - local itemWidth = menuToolsItem:getContentSize().width - local itemHeight = menuToolsItem:getContentSize().height - menuTools:setPosition(origin.x + itemWidth/2, origin.y + itemHeight/2) - layerMenu:addChild(menuTools) - - return layerMenu - end - - -- play background music, preload effect - - -- uncomment below for the BlackBerry version - -- local bgMusicPath = CCFileUtils:getInstance():fullPathForFilename("background.ogg") - local bgMusicPath = cc.FileUtils:getInstance():fullPathForFilename("background.mp3") - cc.SimpleAudioEngine:getInstance():playMusic(bgMusicPath, true) - local effectPath = cc.FileUtils:getInstance():fullPathForFilename("effect1.wav") - cc.SimpleAudioEngine:getInstance():preloadEffect(effectPath) - - -- run - local sceneGame = cc.Scene:create() - sceneGame:addChild(createLayerFarm()) - sceneGame:addChild(createLayerMenu()) - cc.Director:getInstance():runWithScene(sceneGame) -end - -xpcall(main, __G__TRACKBACK__) diff --git a/templates/multi-platform-lua/Resources/hello2.lua b/templates/multi-platform-lua/Resources/hello2.lua deleted file mode 100644 index 27158aa788..0000000000 --- a/templates/multi-platform-lua/Resources/hello2.lua +++ /dev/null @@ -1,3 +0,0 @@ -function myadd(x, y) - return x + y -end \ No newline at end of file diff --git a/templates/multi-platform-lua/Resources/mobdebug.lua b/templates/multi-platform-lua/Resources/mobdebug.lua deleted file mode 100644 index 31ef8af06b..0000000000 --- a/templates/multi-platform-lua/Resources/mobdebug.lua +++ /dev/null @@ -1,1465 +0,0 @@ --- --- MobDebug 0.542 --- Copyright 2011-13 Paul Kulchenko --- Based on RemDebug 1.0 Copyright Kepler Project 2005 --- - -local mobdebug = { - _NAME = "mobdebug", - _VERSION = 0.542, - _COPYRIGHT = "Paul Kulchenko", - _DESCRIPTION = "Mobile Remote Debugger for the Lua programming language", - port = os and os.getenv and os.getenv("MOBDEBUG_PORT") or 8172, - checkcount = 200, - yieldtimeout = 0.02, -} - -local coroutine = coroutine -local error = error -local getfenv = getfenv -local setfenv = setfenv -local loadstring = loadstring or load -- "load" replaced "loadstring" in Lua 5.2 -local io = io -local os = os -local pairs = pairs -local require = require -local setmetatable = setmetatable -local string = string -local tonumber = tonumber -local unpack = table.unpack or unpack -local rawget = rawget - --- if strict.lua is used, then need to avoid referencing some global --- variables, as they can be undefined; --- use rawget to to avoid complaints from strict.lua at run-time. --- it's safe to do the initialization here as all these variables --- should get defined values (of any) before the debugging starts. --- there is also global 'wx' variable, which is checked as part of --- the debug loop as 'wx' can be loaded at any time during debugging. -local genv = _G or _ENV -local jit = rawget(genv, "jit") -local MOAICoroutine = rawget(genv, "MOAICoroutine") - -if not setfenv then -- Lua 5.2 - -- based on http://lua-users.org/lists/lua-l/2010-06/msg00314.html - -- this assumes f is a function - local function findenv(f) - local level = 1 - repeat - local name, value = debug.getupvalue(f, level) - if name == '_ENV' then return level, value end - level = level + 1 - until name == nil - return nil end - getfenv = function (f) return(select(2, findenv(f)) or _G) end - setfenv = function (f, t) - local level = findenv(f) - if level then debug.setupvalue(f, level, t) end - return f end -end - --- check for OS and convert file names to lower case on windows --- (its file system is case insensitive, but case preserving), as setting a --- breakpoint on x:\Foo.lua will not work if the file was loaded as X:\foo.lua. --- OSX and Windows behave the same way (case insensitive, but case preserving) -local iscasepreserving = os and os.getenv and (os.getenv('WINDIR') - or (os.getenv('OS') or ''):match('[Ww]indows') - or os.getenv('DYLD_LIBRARY_PATH')) - or not io.open("/proc") - --- turn jit off based on Mike Pall's comment in this discussion: --- http://www.freelists.org/post/luajit/Debug-hooks-and-JIT,2 --- "You need to turn it off at the start if you plan to receive --- reliable hook calls at any later point in time." -if jit and jit.off then jit.off() end - -local socket = require "socket" -local debug = require "debug" -local coro_debugger -local coro_debugee -local coroutines = {}; setmetatable(coroutines, {__mode = "k"}) -- "weak" keys -local events = { BREAK = 1, WATCH = 2, RESTART = 3, STACK = 4 } -local breakpoints = {} -local watches = {} -local lastsource -local lastfile -local watchescnt = 0 -local abort -- default value is nil; this is used in start/loop distinction -local seen_hook = false -local checkcount = 0 -local step_into = false -local step_over = false -local step_level = 0 -local stack_level = 0 -local server -local buf -local outputs = {} -local iobase = {print = print} -local basedir = "" -local deferror = "execution aborted at default debugee" -local debugee = function () - local a = 1 - for _ = 1, 10 do a = a + 1 end - error(deferror) -end -local function q(s) return s:gsub('([%(%)%.%%%+%-%*%?%[%^%$%]])','%%%1') end - -local serpent = (function() ---- include Serpent module for serialization -local n, v = "serpent", 0.25 -- (C) 2012-13 Paul Kulchenko; MIT License -local c, d = "Paul Kulchenko", "Lua serializer and pretty printer" -local snum = {[tostring(1/0)]='1/0 --[[math.huge]]',[tostring(-1/0)]='-1/0 --[[-math.huge]]',[tostring(0/0)]='0/0'} -local badtype = {thread = true, userdata = true, cdata = true} -local keyword, globals, G = {}, {}, (_G or _ENV) -for _,k in ipairs({'and', 'break', 'do', 'else', 'elseif', 'end', 'false', - 'for', 'function', 'goto', 'if', 'in', 'local', 'nil', 'not', 'or', 'repeat', - 'return', 'then', 'true', 'until', 'while'}) do keyword[k] = true end -for k,v in pairs(G) do globals[v] = k end -- build func to name mapping -for _,g in ipairs({'coroutine', 'debug', 'io', 'math', 'string', 'table', 'os'}) do - for k,v in pairs(G[g]) do globals[v] = g..'.'..k end end - -local function s(t, opts) - local name, indent, fatal, maxnum = opts.name, opts.indent, opts.fatal, opts.maxnum - local sparse, custom, huge = opts.sparse, opts.custom, not opts.nohuge - local space, maxl = (opts.compact and '' or ' '), (opts.maxlevel or math.huge) - local iname, comm = '_'..(name or ''), opts.comment and (tonumber(opts.comment) or math.huge) - local seen, sref, syms, symn = {}, {'local '..iname..'={}'}, {}, 0 - local function gensym(val) return '_'..(tostring(tostring(val)):gsub("[^%w]",""):gsub("(%d%w+)", - -- tostring(val) is needed because __tostring may return a non-string value - function(s) if not syms[s] then symn = symn+1; syms[s] = symn end return syms[s] end)) end - local function safestr(s) return type(s) == "number" and (huge and snum[tostring(s)] or s) - or type(s) ~= "string" and tostring(s) -- escape NEWLINE/010 and EOF/026 - or ("%q"):format(s):gsub("\010","n"):gsub("\026","\\026") end - local function comment(s,l) return comm and (l or 0) < comm and ' --[['..tostring(s)..']]' or '' end - local function globerr(s,l) return globals[s] and globals[s]..comment(s,l) or not fatal - and safestr(select(2, pcall(tostring, s))) or error("Can't serialize "..tostring(s)) end - local function safename(path, name) -- generates foo.bar, foo[3], or foo['b a r'] - local n = name == nil and '' or name - local plain = type(n) == "string" and n:match("^[%l%u_][%w_]*$") and not keyword[n] - local safe = plain and n or '['..safestr(n)..']' - return (path or '')..(plain and path and '.' or '')..safe, safe end - local alphanumsort = type(opts.sortkeys) == 'function' and opts.sortkeys or function(k, o, n) -- k=keys, o=originaltable, n=padding - local maxn, to = tonumber(n) or 12, {number = 'a', string = 'b'} - local function padnum(d) return ("%0"..maxn.."d"):format(d) end - table.sort(k, function(a,b) - -- sort numeric keys first: k[key] is non-nil for numeric keys - return (k[a] and 0 or to[type(a)] or 'z')..(tostring(a):gsub("%d+",padnum)) - < (k[b] and 0 or to[type(b)] or 'z')..(tostring(b):gsub("%d+",padnum)) end) end - local function val2str(t, name, indent, insref, path, plainindex, level) - local ttype, level, mt = type(t), (level or 0), getmetatable(t) - local spath, sname = safename(path, name) - local tag = plainindex and - ((type(name) == "number") and '' or name..space..'='..space) or - (name ~= nil and sname..space..'='..space or '') - if seen[t] then -- already seen this element - sref[#sref+1] = spath..space..'='..space..seen[t] - return tag..'nil'..comment('ref', level) end - if type(mt) == 'table' and (mt.__serialize or mt.__tostring) then -- knows how to serialize itself - seen[t] = insref or spath - if mt.__serialize then t = mt.__serialize(t) else t = tostring(t) end - ttype = type(t) end -- new value falls through to be serialized - if ttype == "table" then - if level >= maxl then return tag..'{}'..comment('max', level) end - seen[t] = insref or spath - if next(t) == nil then return tag..'{}'..comment(t, level) end -- table empty - local maxn, o, out = math.min(#t, maxnum or #t), {}, {} - for key = 1, maxn do o[key] = key end - if not maxnum or #o < maxnum then - local n = #o -- n = n + 1; o[n] is much faster than o[#o+1] on large tables - for key in pairs(t) do if o[key] ~= key then n = n + 1; o[n] = key end end end - if maxnum and #o > maxnum then o[maxnum+1] = nil end - if opts.sortkeys and #o > maxn then alphanumsort(o, t, opts.sortkeys) end - local sparse = sparse and #o > maxn -- disable sparsness if only numeric keys (shorter output) - for n, key in ipairs(o) do - local value, ktype, plainindex = t[key], type(key), n <= maxn and not sparse - if opts.valignore and opts.valignore[value] -- skip ignored values; do nothing - or opts.keyallow and not opts.keyallow[key] - or opts.valtypeignore and opts.valtypeignore[type(value)] -- skipping ignored value types - or sparse and value == nil then -- skipping nils; do nothing - elseif ktype == 'table' or ktype == 'function' or badtype[ktype] then - if not seen[key] and not globals[key] then - sref[#sref+1] = 'placeholder' - local sname = safename(iname, gensym(key)) -- iname is table for local variables - sref[#sref] = val2str(key,sname,indent,sname,iname,true) end - sref[#sref+1] = 'placeholder' - local path = seen[t]..'['..(seen[key] or globals[key] or gensym(key))..']' - sref[#sref] = path..space..'='..space..(seen[value] or val2str(value,nil,indent,path)) - else - out[#out+1] = val2str(value,key,indent,insref,seen[t],plainindex,level+1) - end - end - local prefix = string.rep(indent or '', level) - local head = indent and '{\n'..prefix..indent or '{' - local body = table.concat(out, ','..(indent and '\n'..prefix..indent or space)) - local tail = indent and "\n"..prefix..'}' or '}' - return (custom and custom(tag,head,body,tail) or tag..head..body..tail)..comment(t, level) - elseif badtype[ttype] then - seen[t] = insref or spath - return tag..globerr(t, level) - elseif ttype == 'function' then - seen[t] = insref or spath - local ok, res = pcall(string.dump, t) - local func = ok and ((opts.nocode and "function() --[[..skipped..]] end" or - "loadstring("..safestr(res)..",'@serialized')")..comment(t, level)) - return tag..(func or globerr(t, level)) - else return tag..safestr(t) end -- handle all other types - end - local sepr = indent and "\n" or ";"..space - local body = val2str(t, name, indent) -- this call also populates sref - local tail = #sref>1 and table.concat(sref, sepr)..sepr or '' - local warn = opts.comment and #sref>1 and space.."--[[incomplete output with shared/self-references skipped]]" or '' - return not name and body..warn or "do local "..body..sepr..tail.."return "..name..sepr.."end" -end - -local function merge(a, b) if b then for k,v in pairs(b) do a[k] = v end end; return a; end -return { _NAME = n, _COPYRIGHT = c, _DESCRIPTION = d, _VERSION = v, serialize = s, - dump = function(a, opts) return s(a, merge({name = '_', compact = true, sparse = true}, opts)) end, - line = function(a, opts) return s(a, merge({sortkeys = true, comment = true}, opts)) end, - block = function(a, opts) return s(a, merge({indent = ' ', sortkeys = true, comment = true}, opts)) end } -end)() ---- end of Serpent module - -local function removebasedir(path, basedir) - if iscasepreserving then - -- check if the lowercased path matches the basedir - -- if so, return substring of the original path (to not lowercase it) - return path:lower():find('^'..q(basedir:lower())) - and path:sub(#basedir+1) or path - else - return string.gsub(path, '^'..q(basedir), '') - end -end - -local function stack(start) - local function vars(f) - local func = debug.getinfo(f, "f").func - local i = 1 - local locals = {} - while true do - local name, value = debug.getlocal(f, i) - if not name then break end - if string.sub(name, 1, 1) ~= '(' then locals[name] = {value, tostring(value)} end - i = i + 1 - end - i = 1 - local ups = {} - while func and true do -- check for func as it may be nil for tail calls - local name, value = debug.getupvalue(func, i) - if not name then break end - ups[name] = {value, tostring(value)} - i = i + 1 - end - return locals, ups - end - - local stack = {} - for i = (start or 0), 100 do - local source = debug.getinfo(i, "Snl") - if not source then break end - - local src = source.source - if src:find("@") == 1 then - src = src:sub(2):gsub("\\", "/") - if src:find("%./") == 1 then src = src:sub(3) end - end - - table.insert(stack, { -- remove basedir from source - {source.name, removebasedir(src, basedir), source.linedefined, - source.currentline, source.what, source.namewhat, source.short_src}, - vars(i+1)}) - if source.what == 'main' then break end - end - return stack -end - -local function set_breakpoint(file, line) - if file == '-' and lastfile then file = lastfile - elseif iscasepreserving then file = string.lower(file) end - if not breakpoints[line] then breakpoints[line] = {} end - breakpoints[line][file] = true -end - -local function remove_breakpoint(file, line) - if file == '-' and lastfile then file = lastfile - elseif iscasepreserving then file = string.lower(file) end - if breakpoints[line] then breakpoints[line][file] = nil end -end - -local function has_breakpoint(file, line) - return breakpoints[line] - and breakpoints[line][iscasepreserving and string.lower(file) or file] -end - -local function restore_vars(vars) - if type(vars) ~= 'table' then return end - - -- locals need to be processed in the reverse order, starting from - -- the inner block out, to make sure that the localized variables - -- are correctly updated with only the closest variable with - -- the same name being changed - -- first loop find how many local variables there is, while - -- the second loop processes them from i to 1 - local i = 1 - while true do - local name = debug.getlocal(3, i) - if not name then break end - i = i + 1 - end - i = i - 1 - local written_vars = {} - while i > 0 do - local name = debug.getlocal(3, i) - if not written_vars[name] then - if string.sub(name, 1, 1) ~= '(' then - debug.setlocal(3, i, rawget(vars, name)) - end - written_vars[name] = true - end - i = i - 1 - end - - i = 1 - local func = debug.getinfo(3, "f").func - while true do - local name = debug.getupvalue(func, i) - if not name then break end - if not written_vars[name] then - if string.sub(name, 1, 1) ~= '(' then - debug.setupvalue(func, i, rawget(vars, name)) - end - written_vars[name] = true - end - i = i + 1 - end -end - -local function capture_vars(level) - local vars = {} - local func = debug.getinfo(level or 3, "f").func - local i = 1 - while true do - local name, value = debug.getupvalue(func, i) - if not name then break end - if string.sub(name, 1, 1) ~= '(' then vars[name] = value end - i = i + 1 - end - i = 1 - while true do - local name, value = debug.getlocal(level or 3, i) - if not name then break end - if string.sub(name, 1, 1) ~= '(' then vars[name] = value end - i = i + 1 - end - -- returned 'vars' table plays a dual role: (1) it captures local values - -- and upvalues to be restored later (in case they are modified in "eval"), - -- and (2) it provides an environment for evaluated chunks. - -- getfenv(func) is needed to provide proper environment for functions, - -- including access to globals, but this causes vars[name] to fail in - -- restore_vars on local variables or upvalues with `nil` values when - -- 'strict' is in effect. To avoid this `rawget` is used in restore_vars. - setmetatable(vars, { __index = getfenv(func), __newindex = getfenv(func) }) - return vars -end - -local function stack_depth(start_depth) - for i = start_depth, 0, -1 do - if debug.getinfo(i, "l") then return i+1 end - end - return start_depth -end - -local function is_safe(stack_level) - -- the stack grows up: 0 is getinfo, 1 is is_safe, 2 is debug_hook, 3 is user function - if stack_level == 3 then return true end - for i = 3, stack_level do - -- return if it is not safe to abort - local info = debug.getinfo(i, "S") - if not info then return true end - if info.what == "C" then return false end - end - return true -end - -local function in_debugger() - local this = debug.getinfo(1, "S").source - -- only need to check few frames as mobdebug frames should be close - for i = 3, 7 do - local info = debug.getinfo(i, "S") - if not info then return false end - if info.source == this then return true end - end - return false -end - -local function is_pending(peer) - -- if there is something already in the buffer, skip check - if not buf and checkcount >= mobdebug.checkcount then - peer:settimeout(0) -- non-blocking - buf = peer:receive(1) - peer:settimeout() -- back to blocking - checkcount = 0 - end - return buf -end - -local function debug_hook(event, line) - -- (1) LuaJIT needs special treatment. Because debug_hook is set for - -- *all* coroutines, and not just the one being debugged as in regular Lua - -- (http://lua-users.org/lists/lua-l/2011-06/msg00513.html), - -- need to avoid debugging mobdebug's own code as LuaJIT doesn't - -- always correctly generate call/return hook events (there are more - -- calls than returns, which breaks stack depth calculation and - -- 'step' and 'step over' commands stop working; possibly because - -- 'tail return' events are not generated by LuaJIT). - -- the next line checks if the debugger is run under LuaJIT and if - -- one of debugger methods is present in the stack, it simply returns. - if jit then - -- when luajit is compiled with LUAJIT_ENABLE_LUA52COMPAT, - -- coroutine.running() returns non-nil for the main thread. - local coro, main = coroutine.running() - if not coro or main then coro = 'main' end - local disabled = coroutines[coro] == false - or coroutines[coro] == nil and coro ~= (coro_debugee or 'main') - if coro_debugee and disabled or not coro_debugee and (disabled or in_debugger()) - then return end - end - - -- (2) check if abort has been requested and it's safe to abort - if abort and is_safe(stack_level) then error(abort) end - - -- (3) also check if this debug hook has not been visited for any reason. - -- this check is needed to avoid stepping in too early - -- (for example, when coroutine.resume() is executed inside start()). - if not seen_hook and in_debugger() then return end - - if event == "call" then - stack_level = stack_level + 1 - elseif event == "return" or event == "tail return" then - stack_level = stack_level - 1 - elseif event == "line" then - -- may need to fall through because of the following: - -- (1) step_into - -- (2) step_over and stack_level <= step_level (need stack_level) - -- (3) breakpoint; check for line first as it's known; then for file - -- (4) socket call (only do every Xth check) - -- (5) at least one watch is registered - if not ( - step_into or step_over or breakpoints[line] or watchescnt > 0 - or is_pending(server) - ) then checkcount = checkcount + 1; return end - - checkcount = mobdebug.checkcount -- force check on the next command - - -- this is needed to check if the stack got shorter or longer. - -- unfortunately counting call/return calls is not reliable. - -- the discrepancy may happen when "pcall(load, '')" call is made - -- or when "error()" is called in a function. - -- in either case there are more "call" than "return" events reported. - -- this validation is done for every "line" event, but should be "cheap" - -- as it checks for the stack to get shorter (or longer by one call). - -- start from one level higher just in case we need to grow the stack. - -- this may happen after coroutine.resume call to a function that doesn't - -- have any other instructions to execute. it triggers three returns: - -- "return, tail return, return", which needs to be accounted for. - stack_level = stack_depth(stack_level+1) - - local caller = debug.getinfo(2, "S") - - -- grab the filename and fix it if needed - local file = lastfile - if (lastsource ~= caller.source) then - file, lastsource = caller.source, caller.source - -- technically, users can supply names that may not use '@', - -- for example when they call loadstring('...', 'filename.lua'). - -- Unfortunately, there is no reliable/quick way to figure out - -- what is the filename and what is the source code. - -- The following will work if the supplied filename uses Unix path. - if file:find("^@") then - file = file:gsub("^@", ""):gsub("\\", "/") - -- need this conversion to be applied to relative and absolute - -- file names as you may write "require 'Foo'" to - -- load "foo.lua" (on a case insensitive file system) and breakpoints - -- set on foo.lua will not work if not converted to the same case. - if iscasepreserving then file = string.lower(file) end - if file:find("%./") == 1 then file = file:sub(3) - else file = file:gsub('^'..q(basedir), '') end - -- some file systems allow newlines in file names; remove these. - file = file:gsub("\n", ' ') - else - -- this is either a file name coming from loadstring("chunk", "file"), - -- or the actual source code that needs to be serialized (as it may - -- include newlines); assume it's a file name if it's all on one line. - file = file:find("[\r\n]") and serpent.line(file) or file - end - - -- set to true if we got here; this only needs to be done once per - -- session, so do it here to at least avoid setting it for every line. - seen_hook = true - lastfile = file - end - - local vars, status, res - if (watchescnt > 0) then - vars = capture_vars() - for index, value in pairs(watches) do - setfenv(value, vars) - local ok, fired = pcall(value) - if ok and fired then - status, res = coroutine.resume(coro_debugger, events.WATCH, vars, file, line, index) - break -- any one watch is enough; don't check multiple times - end - end - end - - -- need to get into the "regular" debug handler, but only if there was - -- no watch that was fired. If there was a watch, handle its result. - local getin = (status == nil) and - (step_into - or (step_over and stack_level <= step_level) - or has_breakpoint(file, line) - or is_pending(server)) - - if getin then - vars = vars or capture_vars() - step_into = false - step_over = false - status, res = coroutine.resume(coro_debugger, events.BREAK, vars, file, line) - end - - -- handle 'stack' command that provides stack() information to the debugger - if status and res == 'stack' then - while status and res == 'stack' do - -- resume with the stack trace and variables - if vars then restore_vars(vars) end -- restore vars so they are reflected in stack values - -- this may fail if __tostring method fails at run-time - local ok, snapshot = pcall(stack, 4) - status, res = coroutine.resume(coro_debugger, ok and events.STACK or events.BREAK, snapshot, file, line) - end - end - - -- need to recheck once more as resume after 'stack' command may - -- return something else (for example, 'exit'), which needs to be handled - if status and res and res ~= 'stack' then - if abort == nil and res == "exit" then os.exit(1); return end - abort = res - -- only abort if safe; if not, there is another (earlier) check inside - -- debug_hook, which will abort execution at the first safe opportunity - if is_safe(stack_level) then error(abort) end - elseif not status and res then - error(res, 2) -- report any other (internal) errors back to the application - end - - if vars then restore_vars(vars) end - end -end - -local function stringify_results(status, ...) - if not status then return status, ... end -- on error report as it - - local t = {...} - for i,v in pairs(t) do -- stringify each of the returned values - local ok, res = pcall(serpent.line, v, {nocode = true, comment = 1}) - t[i] = ok and res or ("%q"):format(res):gsub("\010","n"):gsub("\026","\\026") - end - -- stringify table with all returned values - -- this is done to allow each returned value to be used (serialized or not) - -- intependently and to preserve "original" comments - return pcall(serpent.dump, t, {sparse = false}) -end - -local function debugger_loop(sev, svars, sfile, sline) - local command - local app, osname - local eval_env = svars or {} - local function emptyWatch () return false end - local loaded = {} - for k in pairs(package.loaded) do loaded[k] = true end - - while true do - local line, err - local wx = rawget(genv, "wx") -- use rawread to make strict.lua happy - if (wx or mobdebug.yield) and server.settimeout then server:settimeout(mobdebug.yieldtimeout) end - while true do - line, err = server:receive() - if not line and err == "timeout" then - -- yield for wx GUI applications if possible to avoid "busyness" - app = app or (wx and wx.wxGetApp and wx.wxGetApp()) - if app then - local win = app:GetTopWindow() - local inloop = app:IsMainLoopRunning() - osname = osname or wx.wxPlatformInfo.Get():GetOperatingSystemFamilyName() - if win and not inloop then - -- process messages in a regular way - -- and exit as soon as the event loop is idle - if osname == 'Unix' then wx.wxTimer(app):Start(10, true) end - local exitLoop = function() - win:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_IDLE) - win:Disconnect(wx.wxID_ANY, wx.wxID_ANY, wx.wxEVT_TIMER) - app:ExitMainLoop() - end - win:Connect(wx.wxEVT_IDLE, exitLoop) - win:Connect(wx.wxEVT_TIMER, exitLoop) - app:MainLoop() - end - elseif mobdebug.yield then mobdebug.yield() - end - elseif not line and err == "closed" then - error("Debugger connection unexpectedly closed", 0) - else - -- if there is something in the pending buffer, prepend it to the line - if buf then line = buf .. line; buf = nil end - break - end - end - if server.settimeout then server:settimeout() end -- back to blocking - command = string.sub(line, string.find(line, "^[A-Z]+")) - if command == "SETB" then - local _, _, _, file, line = string.find(line, "^([A-Z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - set_breakpoint(file, tonumber(line)) - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "DELB" then - local _, _, _, file, line = string.find(line, "^([A-Z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - remove_breakpoint(file, tonumber(line)) - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "EXEC" then - local _, _, chunk = string.find(line, "^[A-Z]+%s+(.+)$") - if chunk then - local func, res = loadstring(chunk) - local status - if func then - setfenv(func, eval_env) - status, res = stringify_results(pcall(func)) - end - if status then - server:send("200 OK " .. #res .. "\n") - server:send(res) - else - server:send("401 Error in Expression " .. #res .. "\n") - server:send(res) - end - else - server:send("400 Bad Request\n") - end - elseif command == "LOAD" then - local _, _, size, name = string.find(line, "^[A-Z]+%s+(%d+)%s+(%S.-)%s*$") - size = tonumber(size) - - if abort == nil then -- no LOAD/RELOAD allowed inside start() - if size > 0 then server:receive(size) end - if sfile and sline then - server:send("201 Started " .. sfile .. " " .. sline .. "\n") - else - server:send("200 OK 0\n") - end - else - -- reset environment to allow required modules to load again - -- remove those packages that weren't loaded when debugger started - for k in pairs(package.loaded) do - if not loaded[k] then package.loaded[k] = nil end - end - - if size == 0 and name == '-' then -- RELOAD the current script being debugged - server:send("200 OK 0\n") - coroutine.yield("load") - else - -- receiving 0 bytes blocks (at least in luasocket 2.0.2), so skip reading - local chunk = size == 0 and "" or server:receive(size) - if chunk then -- LOAD a new script for debugging - local func, res = loadstring(chunk, "@"..name) - if func then - server:send("200 OK 0\n") - debugee = func - coroutine.yield("load") - else - server:send("401 Error in Expression " .. #res .. "\n") - server:send(res) - end - else - server:send("400 Bad Request\n") - end - end - end - elseif command == "SETW" then - local _, _, exp = string.find(line, "^[A-Z]+%s+(.+)%s*$") - if exp then - local func, res = loadstring("return(" .. exp .. ")") - if func then - watchescnt = watchescnt + 1 - local newidx = #watches + 1 - watches[newidx] = func - server:send("200 OK " .. newidx .. "\n") - else - server:send("401 Error in Expression " .. #res .. "\n") - server:send(res) - end - else - server:send("400 Bad Request\n") - end - elseif command == "DELW" then - local _, _, index = string.find(line, "^[A-Z]+%s+(%d+)%s*$") - index = tonumber(index) - if index > 0 and index <= #watches then - watchescnt = watchescnt - (watches[index] ~= emptyWatch and 1 or 0) - watches[index] = emptyWatch - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "RUN" then - server:send("200 OK\n") - - local ev, vars, file, line, idx_watch = coroutine.yield() - eval_env = vars - if ev == events.BREAK then - server:send("202 Paused " .. file .. " " .. line .. "\n") - elseif ev == events.WATCH then - server:send("203 Paused " .. file .. " " .. line .. " " .. idx_watch .. "\n") - elseif ev == events.RESTART then - -- nothing to do - else - server:send("401 Error in Execution " .. #file .. "\n") - server:send(file) - end - elseif command == "STEP" then - server:send("200 OK\n") - step_into = true - - local ev, vars, file, line, idx_watch = coroutine.yield() - eval_env = vars - if ev == events.BREAK then - server:send("202 Paused " .. file .. " " .. line .. "\n") - elseif ev == events.WATCH then - server:send("203 Paused " .. file .. " " .. line .. " " .. idx_watch .. "\n") - elseif ev == events.RESTART then - -- nothing to do - else - server:send("401 Error in Execution " .. #file .. "\n") - server:send(file) - end - elseif command == "OVER" or command == "OUT" then - server:send("200 OK\n") - step_over = true - - -- OVER and OUT are very similar except for - -- the stack level value at which to stop - if command == "OUT" then step_level = stack_level - 1 - else step_level = stack_level end - - local ev, vars, file, line, idx_watch = coroutine.yield() - eval_env = vars - if ev == events.BREAK then - server:send("202 Paused " .. file .. " " .. line .. "\n") - elseif ev == events.WATCH then - server:send("203 Paused " .. file .. " " .. line .. " " .. idx_watch .. "\n") - elseif ev == events.RESTART then - -- nothing to do - else - server:send("401 Error in Execution " .. #file .. "\n") - server:send(file) - end - elseif command == "BASEDIR" then - local _, _, dir = string.find(line, "^[A-Z]+%s+(.+)%s*$") - if dir then - basedir = iscasepreserving and string.lower(dir) or dir - -- reset cached source as it may change with basedir - lastsource = nil - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "SUSPEND" then - -- do nothing; it already fulfilled its role - elseif command == "STACK" then - -- first check if we can execute the stack command - -- as it requires yielding back to debug_hook it cannot be executed - -- if we have not seen the hook yet as happens after start(). - -- in this case we simply return an empty result - local vars, ev = {} - if seen_hook then - ev, vars = coroutine.yield("stack") - end - if ev and ev ~= events.STACK then - server:send("401 Error in Execution " .. #vars .. "\n") - server:send(vars) - else - local ok, res = pcall(serpent.dump, vars, {nocode = true, sparse = false}) - if ok then - server:send("200 OK " .. res .. "\n") - else - server:send("401 Error in Execution " .. #res .. "\n") - server:send(res) - end - end - elseif command == "OUTPUT" then - local _, _, stream, mode = string.find(line, "^[A-Z]+%s+(%w+)%s+([dcr])%s*$") - if stream and mode and stream == "stdout" then - -- assign "print" in the global environment - genv.print = mode == 'd' and iobase.print or coroutine.wrap(function(...) - -- wrapping into coroutine.wrap protects this function from - -- being stepped through in the debugger - local tbl = {...} - while true do - if mode == 'c' then iobase.print(unpack(tbl)) end - for n = 1, #tbl do - tbl[n] = select(2, pcall(serpent.line, tbl[n], {nocode = true, comment = false})) end - local file = table.concat(tbl, "\t").."\n" - server:send("204 Output " .. stream .. " " .. #file .. "\n" .. file) - tbl = {coroutine.yield()} - end - end) - server:send("200 OK\n") - else - server:send("400 Bad Request\n") - end - elseif command == "EXIT" then - server:send("200 OK\n") - coroutine.yield("exit") - else - server:send("400 Bad Request\n") - end - end -end - -local function connect(controller_host, controller_port) - return (socket.connect4 or socket.connect)(controller_host, controller_port) -end - -local function isrunning() - return coro_debugger and coroutine.status(coro_debugger) == 'suspended' -end - -local lasthost, lastport - --- Starts a debug session by connecting to a controller -local function start(controller_host, controller_port) - -- only one debugging session can be run (as there is only one debug hook) - if isrunning() then return end - - lasthost = controller_host or lasthost - lastport = controller_port or lastport - - controller_host = lasthost or "localhost" - controller_port = lastport or mobdebug.port - - local err - server, err = (socket.connect4 or socket.connect)(controller_host, controller_port) - if server then - -- correct stack depth which already has some calls on it - -- so it doesn't go into negative when those calls return - -- as this breaks subsequence checks in stack_depth(). - -- start from 16th frame, which is sufficiently large for this check. - stack_level = stack_depth(16) - - -- provide our own traceback function to report the error remotely - do - local dtraceback = debug.traceback - debug.traceback = function (...) - if select('#', ...) >= 1 then - local err, lvl = ... - if err and type(err) ~= 'thread' then - local trace = dtraceback(err, (lvl or 2)+1) - if genv.print == iobase.print then -- no remote redirect - return trace - else - genv.print(trace) -- report the error remotely - return -- don't report locally to avoid double reporting - end - end - end - -- direct call to debug.traceback: return the original. - -- debug.traceback(nil, level) doesn't work in Lua 5.1 - -- (http://lua-users.org/lists/lua-l/2011-06/msg00574.html), so - -- simply remove first frame from the stack trace - return (dtraceback(...):gsub("(stack traceback:\n)[^\n]*\n", "%1")) - end - end - coro_debugger = coroutine.create(debugger_loop) - debug.sethook(debug_hook, "lcr") - seen_hook = nil -- reset in case the last start() call was refused - step_into = true -- start with step command - return true - else - print(("Could not connect to %s:%s: %s") - :format(controller_host, controller_port, err or "unknown error")) - end -end - -local function controller(controller_host, controller_port, scratchpad) - -- only one debugging session can be run (as there is only one debug hook) - if isrunning() then return end - - lasthost = controller_host or lasthost - lastport = controller_port or lastport - - controller_host = lasthost or "localhost" - controller_port = lastport or mobdebug.port - - local exitonerror = not scratchpad - local err - server, err = (socket.connect4 or socket.connect)(controller_host, controller_port) - if server then - local function report(trace, err) - local msg = err .. "\n" .. trace - server:send("401 Error in Execution " .. #msg .. "\n") - server:send(msg) - return err - end - - seen_hook = true -- allow to accept all commands - coro_debugger = coroutine.create(debugger_loop) - - while true do - step_into = true -- start with step command - abort = false -- reset abort flag from the previous loop - if scratchpad then checkcount = mobdebug.checkcount end -- force suspend right away - - coro_debugee = coroutine.create(debugee) - debug.sethook(coro_debugee, debug_hook, "lcr") - local status, err = coroutine.resume(coro_debugee) - - -- was there an error or is the script done? - -- 'abort' state is allowed here; ignore it - if abort then - if tostring(abort) == 'exit' then break end - else - if status then -- normal execution is done - break - elseif err and not tostring(err):find(deferror) then - -- report the error back - -- err is not necessarily a string, so convert to string to report - report(debug.traceback(coro_debugee), tostring(err)) - if exitonerror then break end - -- resume once more to clear the response the debugger wants to send - -- need to use capture_vars(2) as three would be the level of - -- the caller for controller(), but because of the tail call, - -- the caller may not exist; - -- This is not entirely safe as the user may see the local - -- variable from console, but they will be reset anyway. - -- This functionality is used when scratchpad is paused to - -- gain access to remote console to modify global variables. - local status, err = coroutine.resume(coro_debugger, events.RESTART, capture_vars(2)) - if not status or status and err == "exit" then break end - end - end - end - else - print(("Could not connect to %s:%s: %s") - :format(controller_host, controller_port, err or "unknown error")) - return false - end - return true -end - -local function scratchpad(controller_host, controller_port) - return controller(controller_host, controller_port, true) -end - -local function loop(controller_host, controller_port) - return controller(controller_host, controller_port, false) -end - -local function on() - if not (isrunning() and server) then return end - - -- main is set to true under Lua5.2 for the "main" chunk. - -- Lua5.1 returns co as `nil` in that case. - local co, main = coroutine.running() - if main then co = nil end - if co then - coroutines[co] = true - debug.sethook(co, debug_hook, "lcr") - else - if jit then coroutines.main = true end - debug.sethook(debug_hook, "lcr") - end -end - -local function off() - if not (isrunning() and server) then return end - - -- main is set to true under Lua5.2 for the "main" chunk. - -- Lua5.1 returns co as `nil` in that case. - local co, main = coroutine.running() - if main then co = nil end - - -- don't remove coroutine hook under LuaJIT as there is only one (global) hook - if co then - coroutines[co] = false - if not jit then debug.sethook(co) end - else - if jit then coroutines.main = false end - if not jit then debug.sethook() end - end - - -- check if there is any thread that is still being debugged under LuaJIT; - -- if not, turn the debugging off - if jit then - local remove = true - for co, debugged in pairs(coroutines) do - if debugged then remove = false; break end - end - if remove then debug.sethook() end - end -end - --- Handles server debugging commands -local function handle(params, client, options) - local _, _, command = string.find(params, "^([a-z]+)") - local file, line, watch_idx - if command == "run" or command == "step" or command == "out" - or command == "over" or command == "exit" then - client:send(string.upper(command) .. "\n") - client:receive() -- this should consume the first '200 OK' response - while true do - local done = true - local breakpoint = client:receive() - if not breakpoint then - print("Program finished") - os.exit() - return -- use return here for those cases where os.exit() is not wanted - end - local _, _, status = string.find(breakpoint, "^(%d+)") - if status == "200" then - -- don't need to do anything - elseif status == "202" then - _, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$") - if file and line then - print("Paused at file " .. file .. " line " .. line) - end - elseif status == "203" then - _, _, file, line, watch_idx = string.find(breakpoint, "^203 Paused%s+(.-)%s+(%d+)%s+(%d+)%s*$") - if file and line and watch_idx then - print("Paused at file " .. file .. " line " .. line .. " (watch expression " .. watch_idx .. ": [" .. watches[watch_idx] .. "])") - end - elseif status == "204" then - local _, _, stream, size = string.find(breakpoint, "^204 Output (%w+) (%d+)$") - if stream and size then - local msg = client:receive(tonumber(size)) - print(msg) - if outputs[stream] then outputs[stream](msg) end - -- this was just the output, so go back reading the response - done = false - end - elseif status == "401" then - local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)$") - if size then - local msg = client:receive(tonumber(size)) - print("Error in remote application: " .. msg) - os.exit(1) - return nil, nil, msg -- use return here for those cases where os.exit() is not wanted - end - else - print("Unknown error") - os.exit(1) - -- use return here for those cases where os.exit() is not wanted - return nil, nil, "Debugger error: unexpected response '" .. breakpoint .. "'" - end - if done then break end - end - elseif command == "setb" then - _, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - -- if this is a file name, and not a file source - if not file:find('^".*"$') then - file = string.gsub(file, "\\", "/") -- convert slash - file = removebasedir(file, basedir) - end - client:send("SETB " .. file .. " " .. line .. "\n") - if client:receive() == "200 OK" then - set_breakpoint(file, line) - else - print("Error: breakpoint not inserted") - end - else - print("Invalid command") - end - elseif command == "setw" then - local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") - if exp then - client:send("SETW " .. exp .. "\n") - local answer = client:receive() - local _, _, watch_idx = string.find(answer, "^200 OK (%d+)%s*$") - if watch_idx then - watches[watch_idx] = exp - print("Inserted watch exp no. " .. watch_idx) - else - local _, _, size = string.find(answer, "^401 Error in Expression (%d+)$") - if size then - local err = client:receive(tonumber(size)):gsub(".-:%d+:%s*","") - print("Error: watch expression not set: " .. err) - else - print("Error: watch expression not set") - end - end - else - print("Invalid command") - end - elseif command == "delb" then - _, _, _, file, line = string.find(params, "^([a-z]+)%s+(.-)%s+(%d+)%s*$") - if file and line then - -- if this is a file name, and not a file source - if not file:find('^".*"$') then - file = string.gsub(file, "\\", "/") -- convert slash - file = removebasedir(file, basedir) - end - client:send("DELB " .. file .. " " .. line .. "\n") - if client:receive() == "200 OK" then - remove_breakpoint(file, line) - else - print("Error: breakpoint not removed") - end - else - print("Invalid command") - end - elseif command == "delallb" then - for line, breaks in pairs(breakpoints) do - for file, _ in pairs(breaks) do - client:send("DELB " .. file .. " " .. line .. "\n") - if client:receive() == "200 OK" then - remove_breakpoint(file, line) - else - print("Error: breakpoint at file " .. file .. " line " .. line .. " not removed") - end - end - end - elseif command == "delw" then - local _, _, index = string.find(params, "^[a-z]+%s+(%d+)%s*$") - if index then - client:send("DELW " .. index .. "\n") - if client:receive() == "200 OK" then - watches[index] = nil - else - print("Error: watch expression not removed") - end - else - print("Invalid command") - end - elseif command == "delallw" then - for index, exp in pairs(watches) do - client:send("DELW " .. index .. "\n") - if client:receive() == "200 OK" then - watches[index] = nil - else - print("Error: watch expression at index " .. index .. " [" .. exp .. "] not removed") - end - end - elseif command == "eval" or command == "exec" - or command == "load" or command == "loadstring" - or command == "reload" then - local _, _, exp = string.find(params, "^[a-z]+%s+(.+)$") - if exp or (command == "reload") then - if command == "eval" or command == "exec" then - exp = (exp:gsub("%-%-%[(=*)%[.-%]%1%]", "") -- remove comments - :gsub("%-%-.-\n", " ") -- remove line comments - :gsub("\n", " ")) -- convert new lines - if command == "eval" then exp = "return " .. exp end - client:send("EXEC " .. exp .. "\n") - elseif command == "reload" then - client:send("LOAD 0 -\n") - elseif command == "loadstring" then - local _, _, _, file, lines = string.find(exp, "^([\"'])(.-)%1%s+(.+)") - if not file then - _, _, file, lines = string.find(exp, "^(%S+)%s+(.+)") - end - client:send("LOAD " .. #lines .. " " .. file .. "\n") - client:send(lines) - else - local file = io.open(exp, "r") - if not file and pcall(require, "winapi") then - -- if file is not open and winapi is there, try with a short path; - -- this may be needed for unicode paths on windows - winapi.set_encoding(winapi.CP_UTF8) - file = io.open(winapi.short_path(exp), "r") - end - if not file then error("Cannot open file " .. exp) end - -- read the file and remove the shebang line as it causes a compilation error - local lines = file:read("*all"):gsub("^#!.-\n", "\n") - file:close() - - local file = string.gsub(exp, "\\", "/") -- convert slash - file = removebasedir(file, basedir) - client:send("LOAD " .. #lines .. " " .. file .. "\n") - if #lines > 0 then client:send(lines) end - end - while true do - local params, err = client:receive() - if not params then - return nil, nil, "Debugger connection " .. (err or "error") - end - local done = true - local _, _, status, len = string.find(params, "^(%d+).-%s+(%d+)%s*$") - if status == "200" then - len = tonumber(len) - if len > 0 then - local status, res - local str = client:receive(len) - -- handle serialized table with results - local func, err = loadstring(str) - if func then - status, res = pcall(func) - if not status then err = res - elseif type(res) ~= "table" then - err = "received "..type(res).." instead of expected 'table'" - end - end - if err then - print("Error in processing results: " .. err) - return nil, nil, "Error in processing results: " .. err - end - print(unpack(res)) - return res[1], res - end - elseif status == "201" then - _, _, file, line = string.find(params, "^201 Started%s+(.-)%s+(%d+)%s*$") - elseif status == "202" or params == "200 OK" then - -- do nothing; this only happens when RE/LOAD command gets the response - -- that was for the original command that was aborted - elseif status == "204" then - local _, _, stream, size = string.find(params, "^204 Output (%w+) (%d+)$") - if stream and size then - local msg = client:receive(tonumber(size)) - print(msg) - if outputs[stream] then outputs[stream](msg) end - -- this was just the output, so go back reading the response - done = false - end - elseif status == "401" then - len = tonumber(len) - local res = client:receive(len) - print("Error in expression: " .. res) - return nil, nil, res - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response after EXEC/LOAD '" .. params .. "'" - end - if done then break end - end - else - print("Invalid command") - end - elseif command == "listb" then - for l, v in pairs(breakpoints) do - for f in pairs(v) do - print(f .. ": " .. l) - end - end - elseif command == "listw" then - for i, v in pairs(watches) do - print("Watch exp. " .. i .. ": " .. v) - end - elseif command == "suspend" then - client:send("SUSPEND\n") - elseif command == "stack" then - client:send("STACK\n") - local resp = client:receive() - local _, _, status, res = string.find(resp, "^(%d+)%s+%w+%s+(.+)%s*$") - if status == "200" then - local func, err = loadstring(res) - if func == nil then - print("Error in stack information: " .. err) - return nil, nil, err - end - local ok, stack = pcall(func) - if not ok then - print("Error in stack information: " .. stack) - return nil, nil, stack - end - for _,frame in ipairs(stack) do - print(serpent.line(frame[1], {comment = false})) - end - return stack - elseif status == "401" then - local _, _, len = string.find(resp, "%s+(%d+)%s*$") - len = tonumber(len) - local res = len > 0 and client:receive(len) or "Invalid stack information." - print("Error in expression: " .. res) - return nil, nil, res - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response after STACK" - end - elseif command == "output" then - local _, _, stream, mode = string.find(params, "^[a-z]+%s+(%w+)%s+([dcr])%s*$") - if stream and mode then - client:send("OUTPUT "..stream.." "..mode.."\n") - local resp = client:receive() - local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$") - if status == "200" then - print("Stream "..stream.." redirected") - outputs[stream] = type(options) == 'table' and options.handler or nil - else - print("Unknown error") - return nil, nil, "Debugger error: can't redirect "..stream - end - else - print("Invalid command") - end - elseif command == "basedir" then - local _, _, dir = string.find(params, "^[a-z]+%s+(.+)$") - if dir then - dir = string.gsub(dir, "\\", "/") -- convert slash - if not string.find(dir, "/$") then dir = dir .. "/" end - - local remdir = dir:match("\t(.+)") - if remdir then dir = dir:gsub("/?\t.+", "/") end - basedir = dir - - client:send("BASEDIR "..(remdir or dir).."\n") - local resp = client:receive() - local _, _, status = string.find(resp, "^(%d+)%s+%w+%s*$") - if status == "200" then - print("New base directory is " .. basedir) - else - print("Unknown error") - return nil, nil, "Debugger error: unexpected response after BASEDIR" - end - else - print(basedir) - end - elseif command == "help" then - print("setb -- sets a breakpoint") - print("delb -- removes a breakpoint") - print("delallb -- removes all breakpoints") - print("setw -- adds a new watch expression") - print("delw -- removes the watch expression at index") - print("delallw -- removes all watch expressions") - print("run -- runs until next breakpoint") - print("step -- runs until next line, stepping into function calls") - print("over -- runs until next line, stepping over function calls") - print("out -- runs until line after returning from current function") - print("listb -- lists breakpoints") - print("listw -- lists watch expressions") - print("eval -- evaluates expression on the current context and returns its value") - print("exec -- executes statement on the current context") - print("load -- loads a local file for debugging") - print("reload -- restarts the current debugging session") - print("stack -- reports stack trace") - print("output stdout -- capture and redirect io stream (default|copy|redirect)") - print("basedir [] -- sets the base path of the remote application, or shows the current one") - print("exit -- exits debugger") - else - local _, _, spaces = string.find(params, "^(%s*)$") - if not spaces then - print("Invalid command") - return nil, nil, "Invalid command" - end - end - return file, line -end - --- Starts debugging server -local function listen(host, port) - host = host or "*" - port = port or mobdebug.port - - local socket = require "socket" - - print("Lua Remote Debugger") - print("Run the program you wish to debug") - - local server = socket.bind(host, port) - local client = server:accept() - - client:send("STEP\n") - client:receive() - - local breakpoint = client:receive() - local _, _, file, line = string.find(breakpoint, "^202 Paused%s+(.-)%s+(%d+)%s*$") - if file and line then - print("Paused at file " .. file ) - print("Type 'help' for commands") - else - local _, _, size = string.find(breakpoint, "^401 Error in Execution (%d+)%s*$") - if size then - print("Error in remote application: ") - print(client:receive(size)) - end - end - - while true do - io.write("> ") - local line = io.read("*line") - handle(line, client) - end -end - -local cocreate -local function coro() - if cocreate then return end -- only set once - cocreate = cocreate or coroutine.create - coroutine.create = function(f, ...) - return cocreate(function(...) - require("mobdebug").on() - return f(...) - end, ...) - end -end - -local moconew -local function moai() - if moconew then return end -- only set once - moconew = moconew or (MOAICoroutine and MOAICoroutine.new) - if not moconew then return end - MOAICoroutine.new = function(...) - local thread = moconew(...) - -- need to support both thread.run and getmetatable(thread).run, which - -- was used in earlier MOAI versions - local mt = thread.run and thread or getmetatable(thread) - local patched = mt.run - mt.run = function(self, f, ...) - return patched(self, function(...) - require("mobdebug").on() - return f(...) - end, ...) - end - return thread - end -end - --- this is a function that removes all hooks and closes the socket to --- report back to the controller that the debugging is done. --- the script that called `done` can still continue. -local function done() - if not (isrunning() and server) then return end - - if not jit then - for co, debugged in pairs(coroutines) do - if debugged then debug.sethook(co) end - end - end - - debug.sethook() - server:close() - - coro_debugger = nil -- to make sure isrunning() returns `false` - seen_hook = nil -- to make sure that the next start() call works - abort = nil -- to make sure that callback calls use proper "abort" value -end - --- make public functions available -mobdebug.listen = listen -mobdebug.loop = loop -mobdebug.scratchpad = scratchpad -mobdebug.handle = handle -mobdebug.connect = connect -mobdebug.start = start -mobdebug.on = on -mobdebug.off = off -mobdebug.moai = moai -mobdebug.coro = coro -mobdebug.done = done -mobdebug.line = serpent.line -mobdebug.dump = serpent.dump -mobdebug.yield = nil -- callback - --- this is needed to make "require 'modebug'" to work when mobdebug --- module is loaded manually -package.loaded.mobdebug = mobdebug - -return mobdebug diff --git a/templates/multi-platform-lua/proj.android/.classpath b/templates/multi-platform-lua/proj.android/.classpath deleted file mode 100644 index 0b08408342..0000000000 --- a/templates/multi-platform-lua/proj.android/.classpath +++ /dev/null @@ -1,9 +0,0 @@ - - - - - - - - - diff --git a/templates/multi-platform-lua/proj.android/.project b/templates/multi-platform-lua/proj.android/.project deleted file mode 100644 index 046823a87b..0000000000 --- a/templates/multi-platform-lua/proj.android/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - HelloLua - - - - - - com.android.ide.eclipse.adt.ResourceManagerBuilder - - - - - com.android.ide.eclipse.adt.PreCompilerBuilder - - - - - org.eclipse.jdt.core.javabuilder - - - - - com.android.ide.eclipse.adt.ApkBuilder - - - - - - com.android.ide.eclipse.adt.AndroidNature - org.eclipse.jdt.core.javanature - - diff --git a/templates/multi-platform-lua/proj.android/AndroidManifest.xml b/templates/multi-platform-lua/proj.android/AndroidManifest.xml deleted file mode 100644 index ba17733142..0000000000 --- a/templates/multi-platform-lua/proj.android/AndroidManifest.xml +++ /dev/null @@ -1,36 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/multi-platform-lua/proj.android/ant.properties b/templates/multi-platform-lua/proj.android/ant.properties deleted file mode 100644 index b0971e891e..0000000000 --- a/templates/multi-platform-lua/proj.android/ant.properties +++ /dev/null @@ -1,17 +0,0 @@ -# This file is used to override default values used by the Ant build system. -# -# This file must be checked into Version Control Systems, as it is -# integral to the build system of your project. - -# This file is only used by the Ant script. - -# You can use this to override default values such as -# 'source.dir' for the location of your java source folder and -# 'out.dir' for the location of your output folder. - -# You can also use it define how the release builds are signed by declaring -# the following properties: -# 'key.store' for the location of your keystore and -# 'key.alias' for the name of the key to use. -# The password will be asked during the build when you use the 'release' target. - diff --git a/templates/multi-platform-lua/proj.android/build.xml b/templates/multi-platform-lua/proj.android/build.xml deleted file mode 100644 index ff293087f2..0000000000 --- a/templates/multi-platform-lua/proj.android/build.xml +++ /dev/null @@ -1,83 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/templates/multi-platform-lua/proj.android/build_native.py b/templates/multi-platform-lua/proj.android/build_native.py deleted file mode 100755 index f5d485da07..0000000000 --- a/templates/multi-platform-lua/proj.android/build_native.py +++ /dev/null @@ -1,170 +0,0 @@ -#!/usr/bin/python -# build_native.py -# Build native codes - - -import sys -import os, os.path -import shutil -from optparse import OptionParser - -def get_num_of_cpu(): - ''' The build process can be accelerated by running multiple concurrent job processes using the -j-option. - ''' - try: - platform = sys.platform - if platform == 'win32': - if 'NUMBER_OF_PROCESSORS' in os.environ: - return int(os.environ['NUMBER_OF_PROCESSORS']) - else: - return 1 - else: - from numpy.distutils import cpuinfo - return cpuinfo.cpu._getNCPUs() - except Exception: - print "Can't know cpuinfo, use default 1 cpu" - return 1 - -def check_environment_variables_sdk(): - ''' Checking the environment ANDROID_SDK_ROOT, which will be used for building - ''' - - try: - SDK_ROOT = os.environ['ANDROID_SDK_ROOT'] - except Exception: - print "ANDROID_SDK_ROOT not defined. Please define ANDROID_SDK_ROOT in your environment" - sys.exit(1) - - return SDK_ROOT - -def check_environment_variables(): - ''' Checking the environment NDK_ROOT, which will be used for building - ''' - - try: - NDK_ROOT = os.environ['NDK_ROOT'] - except Exception: - print "NDK_ROOT not defined. Please define NDK_ROOT in your environment" - sys.exit(1) - - return NDK_ROOT - -def select_toolchain_version(): - '''Because ndk-r8e uses gcc4.6 as default. gcc4.6 doesn't support c++11. So we should select gcc4.7 when - using ndk-r8e. But gcc4.7 is removed in ndk-r9, so we should determine whether gcc4.7 exist. - Conclution: - ndk-r8e -> use gcc4.7 - ndk-r9 -> use gcc4.8 - ''' - - ndk_root = check_environment_variables() - if os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.8")): - os.environ['NDK_TOOLCHAIN_VERSION'] = '4.8' - print "The Selected NDK toolchain version was 4.8 !" - elif os.path.isdir(os.path.join(ndk_root,"toolchains/arm-linux-androideabi-4.7")): - os.environ['NDK_TOOLCHAIN_VERSION'] = '4.7' - print "The Selected NDK toolchain version was 4.7 !" - else: - print "Couldn't find the gcc toolchain." - exit(1) - -def do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode): - - ndk_path = os.path.join(ndk_root, "ndk-build") - - # windows should use ";" to seperate module paths - platform = sys.platform - if platform == 'win32': - ndk_module_path = 'NDK_MODULE_PATH=%s;%s/external;%s/cocos' % (cocos_root, cocos_root, cocos_root) - else: - ndk_module_path = 'NDK_MODULE_PATH=%s:%s/external:%s/cocos' % (cocos_root, cocos_root, cocos_root) - - num_of_cpu = get_num_of_cpu() - - if ndk_build_param == None: - command = '%s -j%d -C %s %s' % (ndk_path, num_of_cpu, app_android_root, ndk_module_path) - else: - command = '%s -j%d -C %s %s %s' % (ndk_path, num_of_cpu, app_android_root, ''.join(str(e) for e in ndk_build_param), ndk_module_path) - if os.system(command) != 0: - raise Exception("Build dynamic library for project [ " + app_android_root + " ] fails!") - elif android_platform is not None: - sdk_tool_path = os.path.join(sdk_root, "tools/android") - cocoslib_path = os.path.join(cocos_root, "cocos/2d/platform/android/java") - command = '%s update lib-project -t %s -p %s' % (sdk_tool_path,android_platform,cocoslib_path) - if os.system(command) != 0: - raise Exception("update cocos lib-project [ " + cocoslib_path + " ] fails!") - command = '%s update project -t %s -p %s -s' % (sdk_tool_path,android_platform,app_android_root) - if os.system(command) != 0: - raise Exception("update project [ " + app_android_root + " ] fails!") - buildfile_path = os.path.join(app_android_root, "build.xml") - command = 'ant clean %s -f %s -Dsdk.dir=%s' % (build_mode,buildfile_path,sdk_root) - os.system(command) - -def copy_files(src, dst): - - for item in os.listdir(src): - path = os.path.join(src, item) - # Android can not package the file that ends with ".gz" - if not item.startswith('.') and not item.endswith('.gz') and os.path.isfile(path): - shutil.copy(path, dst) - if os.path.isdir(path): - new_dst = os.path.join(dst, item) - os.mkdir(new_dst) - copy_files(path, new_dst) - -def copy_resources(app_android_root): - - # remove app_android_root/assets if it exists - assets_dir = os.path.join(app_android_root, "assets") - if os.path.isdir(assets_dir): - shutil.rmtree(assets_dir) - - # copy resources - os.mkdir(assets_dir) - resources_dir = os.path.join(app_android_root, "../Resources") - if os.path.isdir(resources_dir): - copy_files(resources_dir, assets_dir) - - # lua project should copy lua script - resources_dir = os.path.join(app_android_root, "../cocos2d/cocos/scripting/lua/script") - copy_files(resources_dir, assets_dir) - -def build(ndk_build_param,android_platform,build_mode): - - ndk_root = check_environment_variables() - sdk_root = None - select_toolchain_version() - - current_dir = os.path.dirname(os.path.realpath(__file__)) - cocos_root = os.path.join(current_dir, "../cocos2d") - - app_android_root = current_dir - copy_resources(app_android_root) - - if android_platform is not None: - sdk_root = check_environment_variables_sdk() - if android_platform.isdigit(): - android_platform = 'android-'+android_platform - else: - print 'please use vaild android platform' - exit(1) - - if build_mode is None: - build_mode = 'debug' - elif build_mode != 'release': - build_mode = 'debug' - - do_build(cocos_root, ndk_root, app_android_root,ndk_build_param,sdk_root,android_platform,build_mode) - -# -------------- main -------------- -if __name__ == '__main__': - - parser = OptionParser() - parser.add_option("-n", "--ndk", dest="ndk_build_param", help='parameter for ndk-build') - parser.add_option("-p", "--platform", dest="android_platform", - help='parameter for android-update.Without the parameter,the script just build dynamic library for project. Valid android-platform are:[10|11|12|13|14|15|16|17|18|19]') - parser.add_option("-b", "--build", dest="build_mode", - help='the build mode for java project,debug[default] or release.Get more information,please refer to http://developer.android.com/tools/building/building-cmdline.html') - (opts, args) = parser.parse_args() - - build(opts.ndk_build_param,opts.android_platform,opts.build_mode) diff --git a/templates/multi-platform-lua/proj.android/jni/Android.mk b/templates/multi-platform-lua/proj.android/jni/Android.mk deleted file mode 100644 index eb2ff9f081..0000000000 --- a/templates/multi-platform-lua/proj.android/jni/Android.mk +++ /dev/null @@ -1,20 +0,0 @@ -LOCAL_PATH := $(call my-dir) - -include $(CLEAR_VARS) - -LOCAL_MODULE := cocos2dlua_shared - -LOCAL_MODULE_FILENAME := libcocos2dlua - -LOCAL_SRC_FILES := hellolua/main.cpp \ - ../../Classes/AppDelegate.cpp - - -LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes \ - $(LOCAL_PATH)/../../cocos2d/external/lua/tolua - -LOCAL_WHOLE_STATIC_LIBRARIES := cocos_lua_static - -include $(BUILD_SHARED_LIBRARY) - -$(call import-module,scripting/lua/bindings) \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.android/jni/Application.mk b/templates/multi-platform-lua/proj.android/jni/Application.mk deleted file mode 100644 index de85c24eda..0000000000 --- a/templates/multi-platform-lua/proj.android/jni/Application.mk +++ /dev/null @@ -1,4 +0,0 @@ -APP_STL := gnustl_static -APP_CPPFLAGS := -frtti -DCOCOS2D_DEBUG=1 -DCC_ENABLE_CHIPMUNK_INTEGRATION=1 -std=c++11 -fsigned-char -APP_CPPFLAGS += -fexceptions - diff --git a/templates/multi-platform-lua/proj.android/jni/hellolua/main.cpp b/templates/multi-platform-lua/proj.android/jni/hellolua/main.cpp deleted file mode 100644 index a8b36b317d..0000000000 --- a/templates/multi-platform-lua/proj.android/jni/hellolua/main.cpp +++ /dev/null @@ -1,16 +0,0 @@ -#include "AppDelegate.h" -#include "cocos2d.h" -#include "CCEventType.h" -#include "platform/android/jni/JniHelper.h" -#include -#include - -#define LOG_TAG "main" -#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__) - -using namespace cocos2d; - -void cocos_android_app_init (struct android_app* app) { - LOGD("cocos_android_app_init"); - AppDelegate *pAppDelegate = new AppDelegate(); -} diff --git a/templates/multi-platform-lua/proj.android/proguard-project.txt b/templates/multi-platform-lua/proj.android/proguard-project.txt deleted file mode 100644 index f2fe1559a2..0000000000 --- a/templates/multi-platform-lua/proj.android/proguard-project.txt +++ /dev/null @@ -1,20 +0,0 @@ -# To enable ProGuard in your project, edit project.properties -# to define the proguard.config property as described in that file. -# -# Add project specific ProGuard rules here. -# By default, the flags in this file are appended to flags specified -# in ${sdk.dir}/tools/proguard/proguard-android.txt -# You can edit the include path and order by changing the ProGuard -# include property in project.properties. -# -# For more details, see -# http://developer.android.com/guide/developing/tools/proguard.html - -# Add any project specific keep options here: - -# If your project uses WebView with JS, uncomment the following -# and specify the fully qualified class name to the JavaScript interface -# class: -#-keepclassmembers class fqcn.of.javascript.interface.for.webview { -# public *; -#} diff --git a/templates/multi-platform-lua/proj.android/project.properties b/templates/multi-platform-lua/proj.android/project.properties deleted file mode 100644 index 870a4a196d..0000000000 --- a/templates/multi-platform-lua/proj.android/project.properties +++ /dev/null @@ -1,13 +0,0 @@ -# This file is automatically generated by Android Tools. -# Do not modify this file -- YOUR CHANGES WILL BE ERASED! -# -# This file must be checked in Version Control Systems. -# -# To customize properties used by the Ant build system use, -# "ant.properties", and override values to adapt the script to your -# project structure. - -# Project target. -target=android-10 - -android.library.reference.1=../cocos2d/cocos/2d/platform/android/java diff --git a/templates/multi-platform-lua/proj.android/res/values/strings.xml b/templates/multi-platform-lua/proj.android/res/values/strings.xml deleted file mode 100644 index d2c2ebdfb1..0000000000 --- a/templates/multi-platform-lua/proj.android/res/values/strings.xml +++ /dev/null @@ -1,4 +0,0 @@ - - - HelloLua - diff --git a/templates/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java b/templates/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java deleted file mode 100644 index 64291576f5..0000000000 --- a/templates/multi-platform-lua/proj.android/src/org/cocos2dx/lua/Cocos2dxActivity.java +++ /dev/null @@ -1,32 +0,0 @@ -package org.cocos2dx.lua; - -import android.app.NativeActivity; -import android.os.Bundle; - -public class Cocos2dxActivity extends NativeActivity{ - - @Override - protected void onCreate(Bundle savedInstanceState) { - // TODO Auto-generated method stub - super.onCreate(savedInstanceState); - - //For supports translucency - - //1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp - /*const EGLint attribs[] = { - EGL_SURFACE_TYPE, EGL_WINDOW_BIT, - EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT, - //EGL_BLUE_SIZE, 5, -->delete - //EGL_GREEN_SIZE, 6, -->delete - //EGL_RED_SIZE, 5, -->delete - EGL_BUFFER_SIZE, 32, //-->new field - EGL_DEPTH_SIZE, 16, - EGL_STENCIL_SIZE, 8, - EGL_NONE - };*/ - - //2.Set the format of window - // getWindow().setFormat(PixelFormat.TRANSLUCENT); - - } -} diff --git a/templates/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj b/templates/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj deleted file mode 100644 index c078a091f1..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/HelloLua.xcodeproj/project.pbxproj +++ /dev/null @@ -1,1028 +0,0 @@ -// !$*UTF8*$! -{ - archiveVersion = 1; - classes = { - }; - objectVersion = 46; - objects = { - -/* Begin PBXBuildFile section */ - 01A8D331187A504A001CC002 /* CocoStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32E187A5049001CC002 /* CocoStudio.lua */; }; - 01A8D332187A504A001CC002 /* CocoStudio.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32E187A5049001CC002 /* CocoStudio.lua */; }; - 01A8D333187A504A001CC002 /* extern.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32F187A504A001CC002 /* extern.lua */; }; - 01A8D334187A504A001CC002 /* extern.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D32F187A504A001CC002 /* extern.lua */; }; - 01A8D335187A504A001CC002 /* GuiConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D330187A504A001CC002 /* GuiConstants.lua */; }; - 01A8D336187A504A001CC002 /* GuiConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 01A8D330187A504A001CC002 /* GuiConstants.lua */; }; - 15A8A4441834C43700142BE0 /* libchipmunk iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4291834BDA200142BE0 /* libchipmunk iOS.a */; }; - 15A8A4451834C43700142BE0 /* libcocos2dx iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4251834BDA200142BE0 /* libcocos2dx iOS.a */; }; - 15A8A4461834C43700142BE0 /* libcocos2dx-extensions iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4271834BDA200142BE0 /* libcocos2dx-extensions iOS.a */; }; - 15A8A4471834C43700142BE0 /* libCocosDenshion iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A42D1834BDA200142BE0 /* libCocosDenshion iOS.a */; }; - 15A8A4481834C43700142BE0 /* libluabindings iOS.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4311834BDA200142BE0 /* libluabindings iOS.a */; }; - 15A8A4491834C64F00142BE0 /* Icon-114.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810C17EBBCAC00990C9B /* Icon-114.png */; }; - 15A8A4641834C6AD00142BE0 /* AudioEngine.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */; }; - 15A8A4651834C6AD00142BE0 /* AudioEngine.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */; }; - 15A8A4661834C6AD00142BE0 /* CCBReaderLoad.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */; }; - 15A8A4671834C6AD00142BE0 /* CCBReaderLoad.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */; }; - 15A8A4681834C6AD00142BE0 /* Cocos2d.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */; }; - 15A8A4691834C6AD00142BE0 /* Cocos2d.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */; }; - 15A8A46A1834C6AD00142BE0 /* Cocos2dConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4581834C6AD00142BE0 /* Cocos2dConstants.lua */; }; - 15A8A46B1834C6AD00142BE0 /* Cocos2dConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4581834C6AD00142BE0 /* Cocos2dConstants.lua */; }; - 15A8A46C1834C6AD00142BE0 /* Deprecated.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4591834C6AD00142BE0 /* Deprecated.lua */; }; - 15A8A46D1834C6AD00142BE0 /* Deprecated.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4591834C6AD00142BE0 /* Deprecated.lua */; }; - 15A8A46E1834C6AD00142BE0 /* DeprecatedClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45A1834C6AD00142BE0 /* DeprecatedClass.lua */; }; - 15A8A46F1834C6AD00142BE0 /* DeprecatedClass.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45A1834C6AD00142BE0 /* DeprecatedClass.lua */; }; - 15A8A4701834C6AD00142BE0 /* DeprecatedEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45B1834C6AD00142BE0 /* DeprecatedEnum.lua */; }; - 15A8A4711834C6AD00142BE0 /* DeprecatedEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45B1834C6AD00142BE0 /* DeprecatedEnum.lua */; }; - 15A8A4721834C6AD00142BE0 /* DeprecatedOpenglEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45C1834C6AD00142BE0 /* DeprecatedOpenglEnum.lua */; }; - 15A8A4731834C6AD00142BE0 /* DeprecatedOpenglEnum.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45C1834C6AD00142BE0 /* DeprecatedOpenglEnum.lua */; }; - 15A8A4741834C6AD00142BE0 /* DrawPrimitives.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45D1834C6AD00142BE0 /* DrawPrimitives.lua */; }; - 15A8A4751834C6AD00142BE0 /* DrawPrimitives.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45D1834C6AD00142BE0 /* DrawPrimitives.lua */; }; - 15A8A4761834C6AD00142BE0 /* json.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45E1834C6AD00142BE0 /* json.lua */; }; - 15A8A4771834C6AD00142BE0 /* json.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45E1834C6AD00142BE0 /* json.lua */; }; - 15A8A4781834C6AD00142BE0 /* luaj.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45F1834C6AD00142BE0 /* luaj.lua */; }; - 15A8A4791834C6AD00142BE0 /* luaj.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A45F1834C6AD00142BE0 /* luaj.lua */; }; - 15A8A47A1834C6AD00142BE0 /* luaoc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4601834C6AD00142BE0 /* luaoc.lua */; }; - 15A8A47B1834C6AD00142BE0 /* luaoc.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4601834C6AD00142BE0 /* luaoc.lua */; }; - 15A8A47C1834C6AD00142BE0 /* Opengl.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4611834C6AD00142BE0 /* Opengl.lua */; }; - 15A8A47D1834C6AD00142BE0 /* Opengl.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4611834C6AD00142BE0 /* Opengl.lua */; }; - 15A8A47E1834C6AD00142BE0 /* OpenglConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4621834C6AD00142BE0 /* OpenglConstants.lua */; }; - 15A8A47F1834C6AD00142BE0 /* OpenglConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4621834C6AD00142BE0 /* OpenglConstants.lua */; }; - 15A8A4801834C6AD00142BE0 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4631834C6AD00142BE0 /* StudioConstants.lua */; }; - 15A8A4811834C6AD00142BE0 /* StudioConstants.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15A8A4631834C6AD00142BE0 /* StudioConstants.lua */; }; - 15A8A4821834C73500142BE0 /* libchipmunk Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A41B1834BDA200142BE0 /* libchipmunk Mac.a */; }; - 15A8A4831834C73500142BE0 /* libcocos2dx Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4171834BDA200142BE0 /* libcocos2dx Mac.a */; }; - 15A8A4841834C73500142BE0 /* libcocos2dx-extensions Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4191834BDA200142BE0 /* libcocos2dx-extensions Mac.a */; }; - 15A8A4851834C73500142BE0 /* libCocosDenshion Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A41F1834BDA200142BE0 /* libCocosDenshion Mac.a */; }; - 15A8A4861834C73500142BE0 /* libluabindings Mac.a in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4231834BDA200142BE0 /* libluabindings Mac.a */; }; - 15A8A4881834C90F00142BE0 /* libcurl.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 15A8A4871834C90E00142BE0 /* libcurl.dylib */; }; - 15FFA0FD1894DDEF00C96D45 /* mobdebug.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15FFA0FC1894DDEF00C96D45 /* mobdebug.lua */; }; - 15FFA0FE1894DDEF00C96D45 /* mobdebug.lua in Resources */ = {isa = PBXBuildFile; fileRef = 15FFA0FC1894DDEF00C96D45 /* mobdebug.lua */; }; - 1AC3622F16D47C5C000847F2 /* background.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622316D47C5C000847F2 /* background.mp3 */; }; - 1AC3623016D47C5C000847F2 /* background.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622416D47C5C000847F2 /* background.ogg */; }; - 1AC3623116D47C5C000847F2 /* crop.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622516D47C5C000847F2 /* crop.png */; }; - 1AC3623216D47C5C000847F2 /* dog.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622616D47C5C000847F2 /* dog.png */; }; - 1AC3623316D47C5C000847F2 /* effect1.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622716D47C5C000847F2 /* effect1.wav */; }; - 1AC3623416D47C5C000847F2 /* farm.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622816D47C5C000847F2 /* farm.jpg */; }; - 1AC3623516D47C5C000847F2 /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622916D47C5C000847F2 /* fonts */; }; - 1AC3623616D47C5C000847F2 /* hello.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622A16D47C5C000847F2 /* hello.lua */; }; - 1AC3623716D47C5C000847F2 /* hello2.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622B16D47C5C000847F2 /* hello2.lua */; }; - 1AC3623816D47C5C000847F2 /* land.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622C16D47C5C000847F2 /* land.png */; }; - 1AC3623916D47C5C000847F2 /* menu1.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622D16D47C5C000847F2 /* menu1.png */; }; - 1AC3623A16D47C5C000847F2 /* menu2.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622E16D47C5C000847F2 /* menu2.png */; }; - 1AF4C403178663F200122817 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AF4C402178663F200122817 /* libz.dylib */; }; - 5023811817EBBCAC00990C9B /* AppController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5023810817EBBCAC00990C9B /* AppController.mm */; }; - 5023811917EBBCAC00990C9B /* Default-568h@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810917EBBCAC00990C9B /* Default-568h@2x.png */; }; - 5023811A17EBBCAC00990C9B /* Default.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810A17EBBCAC00990C9B /* Default.png */; }; - 5023811B17EBBCAC00990C9B /* Default@2x.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810B17EBBCAC00990C9B /* Default@2x.png */; }; - 5023811D17EBBCAC00990C9B /* Icon-120.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810D17EBBCAC00990C9B /* Icon-120.png */; }; - 5023811E17EBBCAC00990C9B /* Icon-144.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810E17EBBCAC00990C9B /* Icon-144.png */; }; - 5023811F17EBBCAC00990C9B /* Icon-152.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023810F17EBBCAC00990C9B /* Icon-152.png */; }; - 5023812017EBBCAC00990C9B /* Icon-57.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023811017EBBCAC00990C9B /* Icon-57.png */; }; - 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023811117EBBCAC00990C9B /* Icon-72.png */; }; - 5023812217EBBCAC00990C9B /* Icon-76.png in Resources */ = {isa = PBXBuildFile; fileRef = 5023811217EBBCAC00990C9B /* Icon-76.png */; }; - 5023812417EBBCAC00990C9B /* main.m in Sources */ = {isa = PBXBuildFile; fileRef = 5023811417EBBCAC00990C9B /* main.m */; }; - 5023812517EBBCAC00990C9B /* RootViewController.mm in Sources */ = {isa = PBXBuildFile; fileRef = 5023811717EBBCAC00990C9B /* RootViewController.mm */; }; - 5023813317EBBCE400990C9B /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F293BB7E15EB831F00256477 /* AppDelegate.cpp */; }; - 5023813717EBBCE400990C9B /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 1AF4C402178663F200122817 /* libz.dylib */; }; - 5023813E17EBBCE400990C9B /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3CC15EB7BE500256477 /* QuartzCore.framework */; }; - 5023814017EBBCE400990C9B /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D015EB7BE500256477 /* OpenAL.framework */; }; - 5023814117EBBCE400990C9B /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D215EB7BE500256477 /* AudioToolbox.framework */; }; - 5023814217EBBCE400990C9B /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D415EB7BE500256477 /* AVFoundation.framework */; }; - 5023814417EBBCE400990C9B /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D815EB7BE500256477 /* Foundation.framework */; }; - 5023814517EBBCE400990C9B /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3DA15EB7BE500256477 /* CoreGraphics.framework */; }; - 5023814817EBBCE400990C9B /* background.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622316D47C5C000847F2 /* background.mp3 */; }; - 5023814917EBBCE400990C9B /* background.ogg in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622416D47C5C000847F2 /* background.ogg */; }; - 5023814A17EBBCE400990C9B /* crop.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622516D47C5C000847F2 /* crop.png */; }; - 5023814B17EBBCE400990C9B /* dog.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622616D47C5C000847F2 /* dog.png */; }; - 5023814D17EBBCE400990C9B /* effect1.wav in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622716D47C5C000847F2 /* effect1.wav */; }; - 5023814F17EBBCE400990C9B /* farm.jpg in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622816D47C5C000847F2 /* farm.jpg */; }; - 5023815017EBBCE400990C9B /* fonts in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622916D47C5C000847F2 /* fonts */; }; - 5023815117EBBCE400990C9B /* hello.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622A16D47C5C000847F2 /* hello.lua */; }; - 5023815217EBBCE400990C9B /* hello2.lua in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622B16D47C5C000847F2 /* hello2.lua */; }; - 5023815317EBBCE400990C9B /* land.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622C16D47C5C000847F2 /* land.png */; }; - 5023815617EBBCE400990C9B /* menu1.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622D16D47C5C000847F2 /* menu1.png */; }; - 5023815717EBBCE400990C9B /* menu2.png in Resources */ = {isa = PBXBuildFile; fileRef = 1AC3622E16D47C5C000847F2 /* menu2.png */; }; - 5023817617EBBE3400990C9B /* Icon.icns in Resources */ = {isa = PBXBuildFile; fileRef = 5023817217EBBE3400990C9B /* Icon.icns */; }; - 5023817817EBBE3400990C9B /* main.cpp in Sources */ = {isa = PBXBuildFile; fileRef = 5023817417EBBE3400990C9B /* main.cpp */; }; - 5023817A17EBBE8300990C9B /* OpenGLES.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 5023817917EBBE8300990C9B /* OpenGLES.framework */; }; - 50805AAF17EBBEAA004CFAD3 /* UIKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50805AAE17EBBEAA004CFAD3 /* UIKit.framework */; }; - 5091733617ECE17A00D62437 /* Icon-29.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733017ECE17A00D62437 /* Icon-29.png */; }; - 5091733717ECE17A00D62437 /* Icon-40.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733117ECE17A00D62437 /* Icon-40.png */; }; - 5091733817ECE17A00D62437 /* Icon-50.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733217ECE17A00D62437 /* Icon-50.png */; }; - 5091733917ECE17A00D62437 /* Icon-58.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733317ECE17A00D62437 /* Icon-58.png */; }; - 5091733A17ECE17A00D62437 /* Icon-80.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733417ECE17A00D62437 /* Icon-80.png */; }; - 5091733B17ECE17A00D62437 /* Icon-100.png in Resources */ = {isa = PBXBuildFile; fileRef = 5091733517ECE17A00D62437 /* Icon-100.png */; }; - 50D7C96C17EBBEDF005D0B91 /* OpenGL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */; }; - 50D7C96E17EBBEE6005D0B91 /* AppKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */; }; - 50D7C97017EBBEEC005D0B91 /* IOKit.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */; }; - D6B061351803AC000077942B /* CoreMotion.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = D6B061341803AC000077942B /* CoreMotion.framework */; }; - F293B3CD15EB7BE500256477 /* QuartzCore.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3CC15EB7BE500256477 /* QuartzCore.framework */; }; - F293B3D115EB7BE500256477 /* OpenAL.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D015EB7BE500256477 /* OpenAL.framework */; }; - F293B3D315EB7BE500256477 /* AudioToolbox.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D215EB7BE500256477 /* AudioToolbox.framework */; }; - F293B3D515EB7BE500256477 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D415EB7BE500256477 /* AVFoundation.framework */; }; - F293B3D915EB7BE500256477 /* Foundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3D815EB7BE500256477 /* Foundation.framework */; }; - F293B3DB15EB7BE500256477 /* CoreGraphics.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = F293B3DA15EB7BE500256477 /* CoreGraphics.framework */; }; - F293BB9C15EB831F00256477 /* AppDelegate.cpp in Sources */ = {isa = PBXBuildFile; fileRef = F293BB7E15EB831F00256477 /* AppDelegate.cpp */; }; -/* End PBXBuildFile section */ - -/* Begin PBXContainerItemProxy section */ - 15A8A4161834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1551A33F158F2AB200E66CFE; - remoteInfo = "cocos2dx Mac"; - }; - 15A8A4181834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2FD617814595006731B9; - remoteInfo = "cocos2dx-extensions Mac"; - }; - 15A8A41A1834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2CB81780BD04006731B9; - remoteInfo = "chipmunk Mac"; - }; - 15A8A41C1834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2D9B1780BDF7006731B9; - remoteInfo = "box2d Mac"; - }; - 15A8A41E1834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F2ED617814268006731B9; - remoteInfo = "CocosDenshion Mac"; - }; - 15A8A4201834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A03F31FD1781479B006731B9; - remoteInfo = "jsbindings Mac"; - }; - 15A8A4221834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1A6FB53017854BC300CDF010; - remoteInfo = "luabindings Mac"; - }; - 15A8A4241834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4D641783777C0073F6A7; - remoteInfo = "cocos2dx iOS"; - }; - 15A8A4261834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4EFC1783867C0073F6A7; - remoteInfo = "cocos2dx-extensions iOS"; - }; - 15A8A4281834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4F3B178387670073F6A7; - remoteInfo = "chipmunk iOS"; - }; - 15A8A42A1834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4F9E1783876B0073F6A7; - remoteInfo = "box2d iOS"; - }; - 15A8A42C1834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A4FB4178387730073F6A7; - remoteInfo = "CocosDenshion iOS"; - }; - 15A8A42E1834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = A07A5030178387750073F6A7; - remoteInfo = "jsbindings iOS"; - }; - 15A8A4301834BDA200142BE0 /* PBXContainerItemProxy */ = { - isa = PBXContainerItemProxy; - containerPortal = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - proxyType = 2; - remoteGlobalIDString = 1A119791178526AA00D62A44; - remoteInfo = "luabindings iOS"; - }; -/* End PBXContainerItemProxy section */ - -/* Begin PBXFileReference section */ - 01A8D32E187A5049001CC002 /* CocoStudio.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CocoStudio.lua; path = ../cocos2d/cocos/scripting/lua/script/CocoStudio.lua; sourceTree = ""; }; - 01A8D32F187A504A001CC002 /* extern.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = extern.lua; path = ../cocos2d/cocos/scripting/lua/script/extern.lua; sourceTree = ""; }; - 01A8D330187A504A001CC002 /* GuiConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = GuiConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/GuiConstants.lua; sourceTree = ""; }; - 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */ = {isa = PBXFileReference; lastKnownFileType = "wrapper.pb-project"; name = cocos2d_libs.xcodeproj; path = ../cocos2d/build/cocos2d_libs.xcodeproj; sourceTree = ""; }; - 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = AudioEngine.lua; path = ../cocos2d/cocos/scripting/lua/script/AudioEngine.lua; sourceTree = ""; }; - 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = CCBReaderLoad.lua; path = ../cocos2d/cocos/scripting/lua/script/CCBReaderLoad.lua; sourceTree = ""; }; - 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cocos2d.lua; path = ../cocos2d/cocos/scripting/lua/script/Cocos2d.lua; sourceTree = ""; }; - 15A8A4581834C6AD00142BE0 /* Cocos2dConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Cocos2dConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/Cocos2dConstants.lua; sourceTree = ""; }; - 15A8A4591834C6AD00142BE0 /* Deprecated.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Deprecated.lua; path = ../cocos2d/cocos/scripting/lua/script/Deprecated.lua; sourceTree = ""; }; - 15A8A45A1834C6AD00142BE0 /* DeprecatedClass.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedClass.lua; path = ../cocos2d/cocos/scripting/lua/script/DeprecatedClass.lua; sourceTree = ""; }; - 15A8A45B1834C6AD00142BE0 /* DeprecatedEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedEnum.lua; path = ../cocos2d/cocos/scripting/lua/script/DeprecatedEnum.lua; sourceTree = ""; }; - 15A8A45C1834C6AD00142BE0 /* DeprecatedOpenglEnum.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DeprecatedOpenglEnum.lua; path = ../cocos2d/cocos/scripting/lua/script/DeprecatedOpenglEnum.lua; sourceTree = ""; }; - 15A8A45D1834C6AD00142BE0 /* DrawPrimitives.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = DrawPrimitives.lua; path = ../cocos2d/cocos/scripting/lua/script/DrawPrimitives.lua; sourceTree = ""; }; - 15A8A45E1834C6AD00142BE0 /* json.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = json.lua; path = ../cocos2d/cocos/scripting/lua/script/json.lua; sourceTree = ""; }; - 15A8A45F1834C6AD00142BE0 /* luaj.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = luaj.lua; path = ../cocos2d/cocos/scripting/lua/script/luaj.lua; sourceTree = ""; }; - 15A8A4601834C6AD00142BE0 /* luaoc.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = luaoc.lua; path = ../cocos2d/cocos/scripting/lua/script/luaoc.lua; sourceTree = ""; }; - 15A8A4611834C6AD00142BE0 /* Opengl.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = Opengl.lua; path = ../cocos2d/cocos/scripting/lua/script/Opengl.lua; sourceTree = ""; }; - 15A8A4621834C6AD00142BE0 /* OpenglConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = OpenglConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/OpenglConstants.lua; sourceTree = ""; }; - 15A8A4631834C6AD00142BE0 /* StudioConstants.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = StudioConstants.lua; path = ../cocos2d/cocos/scripting/lua/script/StudioConstants.lua; sourceTree = ""; }; - 15A8A4871834C90E00142BE0 /* libcurl.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libcurl.dylib; path = usr/lib/libcurl.dylib; sourceTree = SDKROOT; }; - 15C1568D1683131500D239F2 /* libcurl.a */ = {isa = PBXFileReference; lastKnownFileType = archive.ar; name = libcurl.a; path = ../cocos2d/cocos2dx/platform/third_party/ios/libraries/libcurl.a; sourceTree = ""; }; - 15FFA0FC1894DDEF00C96D45 /* mobdebug.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = mobdebug.lua; sourceTree = ""; }; - 1AC3622316D47C5C000847F2 /* background.mp3 */ = {isa = PBXFileReference; lastKnownFileType = audio.mp3; name = background.mp3; path = ../Resources/background.mp3; sourceTree = ""; }; - 1AC3622416D47C5C000847F2 /* background.ogg */ = {isa = PBXFileReference; lastKnownFileType = file; name = background.ogg; path = ../Resources/background.ogg; sourceTree = ""; }; - 1AC3622516D47C5C000847F2 /* crop.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = crop.png; path = ../Resources/crop.png; sourceTree = ""; }; - 1AC3622616D47C5C000847F2 /* dog.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = dog.png; path = ../Resources/dog.png; sourceTree = ""; }; - 1AC3622716D47C5C000847F2 /* effect1.wav */ = {isa = PBXFileReference; lastKnownFileType = audio.wav; name = effect1.wav; path = ../Resources/effect1.wav; sourceTree = ""; }; - 1AC3622816D47C5C000847F2 /* farm.jpg */ = {isa = PBXFileReference; lastKnownFileType = image.jpeg; name = farm.jpg; path = ../Resources/farm.jpg; sourceTree = ""; }; - 1AC3622916D47C5C000847F2 /* fonts */ = {isa = PBXFileReference; lastKnownFileType = folder; name = fonts; path = ../Resources/fonts; sourceTree = ""; }; - 1AC3622A16D47C5C000847F2 /* hello.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hello.lua; path = ../Resources/hello.lua; sourceTree = ""; }; - 1AC3622B16D47C5C000847F2 /* hello2.lua */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; name = hello2.lua; path = ../Resources/hello2.lua; sourceTree = ""; }; - 1AC3622C16D47C5C000847F2 /* land.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = land.png; path = ../Resources/land.png; sourceTree = ""; }; - 1AC3622D16D47C5C000847F2 /* menu1.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menu1.png; path = ../Resources/menu1.png; sourceTree = ""; }; - 1AC3622E16D47C5C000847F2 /* menu2.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; name = menu2.png; path = ../Resources/menu2.png; sourceTree = ""; }; - 1AF4C402178663F200122817 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; }; - 5023810717EBBCAC00990C9B /* AppController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = AppController.h; sourceTree = ""; }; - 5023810817EBBCAC00990C9B /* AppController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = AppController.mm; sourceTree = ""; }; - 5023810917EBBCAC00990C9B /* Default-568h@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default-568h@2x.png"; sourceTree = ""; }; - 5023810A17EBBCAC00990C9B /* Default.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = Default.png; sourceTree = ""; }; - 5023810B17EBBCAC00990C9B /* Default@2x.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Default@2x.png"; sourceTree = ""; }; - 5023810C17EBBCAC00990C9B /* Icon-114.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-114.png"; sourceTree = ""; }; - 5023810D17EBBCAC00990C9B /* Icon-120.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-120.png"; sourceTree = ""; }; - 5023810E17EBBCAC00990C9B /* Icon-144.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-144.png"; sourceTree = ""; }; - 5023810F17EBBCAC00990C9B /* Icon-152.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-152.png"; sourceTree = ""; }; - 5023811017EBBCAC00990C9B /* Icon-57.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-57.png"; sourceTree = ""; }; - 5023811117EBBCAC00990C9B /* Icon-72.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-72.png"; sourceTree = ""; }; - 5023811217EBBCAC00990C9B /* Icon-76.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-76.png"; sourceTree = ""; }; - 5023811317EBBCAC00990C9B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5023811417EBBCAC00990C9B /* main.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = main.m; sourceTree = ""; }; - 5023811517EBBCAC00990C9B /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 5023811617EBBCAC00990C9B /* RootViewController.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = RootViewController.h; sourceTree = ""; }; - 5023811717EBBCAC00990C9B /* RootViewController.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = RootViewController.mm; sourceTree = ""; }; - 5023816B17EBBCE400990C9B /* HelloLua Mac.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloLua Mac.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - 5023817217EBBE3400990C9B /* Icon.icns */ = {isa = PBXFileReference; lastKnownFileType = image.icns; path = Icon.icns; sourceTree = ""; }; - 5023817317EBBE3400990C9B /* Info.plist */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text.plist.xml; path = Info.plist; sourceTree = ""; }; - 5023817417EBBE3400990C9B /* main.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; path = main.cpp; sourceTree = ""; }; - 5023817517EBBE3400990C9B /* Prefix.pch */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = Prefix.pch; sourceTree = ""; }; - 5023817917EBBE8300990C9B /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/OpenGLES.framework; sourceTree = DEVELOPER_DIR; }; - 50805AAE17EBBEAA004CFAD3 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/UIKit.framework; sourceTree = DEVELOPER_DIR; }; - 5091733017ECE17A00D62437 /* Icon-29.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-29.png"; sourceTree = ""; }; - 5091733117ECE17A00D62437 /* Icon-40.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-40.png"; sourceTree = ""; }; - 5091733217ECE17A00D62437 /* Icon-50.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-50.png"; sourceTree = ""; }; - 5091733317ECE17A00D62437 /* Icon-58.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-58.png"; sourceTree = ""; }; - 5091733417ECE17A00D62437 /* Icon-80.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-80.png"; sourceTree = ""; }; - 5091733517ECE17A00D62437 /* Icon-100.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "Icon-100.png"; sourceTree = ""; }; - 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGL.framework; path = System/Library/Frameworks/OpenGL.framework; sourceTree = SDKROOT; }; - 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AppKit.framework; path = System/Library/Frameworks/AppKit.framework; sourceTree = SDKROOT; }; - 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = IOKit.framework; path = System/Library/Frameworks/IOKit.framework; sourceTree = SDKROOT; }; - D6B061341803AC000077942B /* CoreMotion.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreMotion.framework; path = Platforms/iPhoneOS.platform/Developer/SDKs/iPhoneOS7.0.sdk/System/Library/Frameworks/CoreMotion.framework; sourceTree = DEVELOPER_DIR; }; - F293B3C815EB7BE500256477 /* HelloLua iOS.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = "HelloLua iOS.app"; sourceTree = BUILT_PRODUCTS_DIR; }; - F293B3CC15EB7BE500256477 /* QuartzCore.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = QuartzCore.framework; path = System/Library/Frameworks/QuartzCore.framework; sourceTree = SDKROOT; }; - F293B3CE15EB7BE500256477 /* OpenGLES.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenGLES.framework; path = System/Library/Frameworks/OpenGLES.framework; sourceTree = SDKROOT; }; - F293B3D015EB7BE500256477 /* OpenAL.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = OpenAL.framework; path = System/Library/Frameworks/OpenAL.framework; sourceTree = SDKROOT; }; - F293B3D215EB7BE500256477 /* AudioToolbox.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AudioToolbox.framework; path = System/Library/Frameworks/AudioToolbox.framework; sourceTree = SDKROOT; }; - F293B3D415EB7BE500256477 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; }; - F293B3D615EB7BE500256477 /* UIKit.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = UIKit.framework; path = System/Library/Frameworks/UIKit.framework; sourceTree = SDKROOT; }; - F293B3D815EB7BE500256477 /* Foundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = Foundation.framework; path = System/Library/Frameworks/Foundation.framework; sourceTree = SDKROOT; }; - F293B3DA15EB7BE500256477 /* CoreGraphics.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = CoreGraphics.framework; path = System/Library/Frameworks/CoreGraphics.framework; sourceTree = SDKROOT; }; - F293BB7E15EB831F00256477 /* AppDelegate.cpp */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.cpp; name = AppDelegate.cpp; path = ../Classes/AppDelegate.cpp; sourceTree = ""; }; - F293BB7F15EB831F00256477 /* AppDelegate.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; name = AppDelegate.h; path = ../Classes/AppDelegate.h; sourceTree = ""; }; -/* End PBXFileReference section */ - -/* Begin PBXFrameworksBuildPhase section */ - 5023813617EBBCE400990C9B /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 15A8A4881834C90F00142BE0 /* libcurl.dylib in Frameworks */, - 15A8A4821834C73500142BE0 /* libchipmunk Mac.a in Frameworks */, - 15A8A4831834C73500142BE0 /* libcocos2dx Mac.a in Frameworks */, - 15A8A4841834C73500142BE0 /* libcocos2dx-extensions Mac.a in Frameworks */, - 15A8A4851834C73500142BE0 /* libCocosDenshion Mac.a in Frameworks */, - 15A8A4861834C73500142BE0 /* libluabindings Mac.a in Frameworks */, - 50D7C97017EBBEEC005D0B91 /* IOKit.framework in Frameworks */, - 50D7C96E17EBBEE6005D0B91 /* AppKit.framework in Frameworks */, - 50D7C96C17EBBEDF005D0B91 /* OpenGL.framework in Frameworks */, - 5023813717EBBCE400990C9B /* libz.dylib in Frameworks */, - 5023813E17EBBCE400990C9B /* QuartzCore.framework in Frameworks */, - 5023814017EBBCE400990C9B /* OpenAL.framework in Frameworks */, - 5023814117EBBCE400990C9B /* AudioToolbox.framework in Frameworks */, - 5023814217EBBCE400990C9B /* AVFoundation.framework in Frameworks */, - 5023814417EBBCE400990C9B /* Foundation.framework in Frameworks */, - 5023814517EBBCE400990C9B /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F293B3C515EB7BE500256477 /* Frameworks */ = { - isa = PBXFrameworksBuildPhase; - buildActionMask = 2147483647; - files = ( - 15A8A4441834C43700142BE0 /* libchipmunk iOS.a in Frameworks */, - 15A8A4451834C43700142BE0 /* libcocos2dx iOS.a in Frameworks */, - 15A8A4461834C43700142BE0 /* libcocos2dx-extensions iOS.a in Frameworks */, - 15A8A4471834C43700142BE0 /* libCocosDenshion iOS.a in Frameworks */, - 15A8A4481834C43700142BE0 /* libluabindings iOS.a in Frameworks */, - D6B061351803AC000077942B /* CoreMotion.framework in Frameworks */, - 1AF4C403178663F200122817 /* libz.dylib in Frameworks */, - 50805AAF17EBBEAA004CFAD3 /* UIKit.framework in Frameworks */, - 5023817A17EBBE8300990C9B /* OpenGLES.framework in Frameworks */, - F293B3CD15EB7BE500256477 /* QuartzCore.framework in Frameworks */, - F293B3D115EB7BE500256477 /* OpenAL.framework in Frameworks */, - F293B3D315EB7BE500256477 /* AudioToolbox.framework in Frameworks */, - F293B3D515EB7BE500256477 /* AVFoundation.framework in Frameworks */, - F293B3D915EB7BE500256477 /* Foundation.framework in Frameworks */, - F293B3DB15EB7BE500256477 /* CoreGraphics.framework in Frameworks */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXFrameworksBuildPhase section */ - -/* Begin PBXGroup section */ - 15A8A4041834BDA200142BE0 /* Products */ = { - isa = PBXGroup; - children = ( - 15A8A4171834BDA200142BE0 /* libcocos2dx Mac.a */, - 15A8A4191834BDA200142BE0 /* libcocos2dx-extensions Mac.a */, - 15A8A41B1834BDA200142BE0 /* libchipmunk Mac.a */, - 15A8A41D1834BDA200142BE0 /* libbox2d Mac.a */, - 15A8A41F1834BDA200142BE0 /* libCocosDenshion Mac.a */, - 15A8A4211834BDA200142BE0 /* libjsbindings Mac.a */, - 15A8A4231834BDA200142BE0 /* libluabindings Mac.a */, - 15A8A4251834BDA200142BE0 /* libcocos2dx iOS.a */, - 15A8A4271834BDA200142BE0 /* libcocos2dx-extensions iOS.a */, - 15A8A4291834BDA200142BE0 /* libchipmunk iOS.a */, - 15A8A42B1834BDA200142BE0 /* libbox2d iOS.a */, - 15A8A42D1834BDA200142BE0 /* libCocosDenshion iOS.a */, - 15A8A42F1834BDA200142BE0 /* libjsbindings iOS.a */, - 15A8A4311834BDA200142BE0 /* libluabindings iOS.a */, - ); - name = Products; - sourceTree = ""; - }; - 1A0227A417A3AA1A00B867AD /* Lua Common */ = { - isa = PBXGroup; - children = ( - 01A8D32E187A5049001CC002 /* CocoStudio.lua */, - 01A8D32F187A504A001CC002 /* extern.lua */, - 01A8D330187A504A001CC002 /* GuiConstants.lua */, - 15A8A4551834C6AD00142BE0 /* AudioEngine.lua */, - 15A8A4561834C6AD00142BE0 /* CCBReaderLoad.lua */, - 15A8A4571834C6AD00142BE0 /* Cocos2d.lua */, - 15A8A4581834C6AD00142BE0 /* Cocos2dConstants.lua */, - 15A8A4591834C6AD00142BE0 /* Deprecated.lua */, - 15A8A45A1834C6AD00142BE0 /* DeprecatedClass.lua */, - 15A8A45B1834C6AD00142BE0 /* DeprecatedEnum.lua */, - 15A8A45C1834C6AD00142BE0 /* DeprecatedOpenglEnum.lua */, - 15A8A45D1834C6AD00142BE0 /* DrawPrimitives.lua */, - 15A8A45E1834C6AD00142BE0 /* json.lua */, - 15A8A45F1834C6AD00142BE0 /* luaj.lua */, - 15A8A4601834C6AD00142BE0 /* luaoc.lua */, - 15A8A4611834C6AD00142BE0 /* Opengl.lua */, - 15A8A4621834C6AD00142BE0 /* OpenglConstants.lua */, - 15A8A4631834C6AD00142BE0 /* StudioConstants.lua */, - ); - name = "Lua Common"; - sourceTree = ""; - }; - 5023810617EBBCAC00990C9B /* ios */ = { - isa = PBXGroup; - children = ( - 5023810717EBBCAC00990C9B /* AppController.h */, - 5023810817EBBCAC00990C9B /* AppController.mm */, - 5023810917EBBCAC00990C9B /* Default-568h@2x.png */, - 5023810A17EBBCAC00990C9B /* Default.png */, - 5023810B17EBBCAC00990C9B /* Default@2x.png */, - 5091734A17ECE18300D62437 /* Icons */, - 5023811317EBBCAC00990C9B /* Info.plist */, - 5023811417EBBCAC00990C9B /* main.m */, - 5023811517EBBCAC00990C9B /* Prefix.pch */, - 5023811617EBBCAC00990C9B /* RootViewController.h */, - 5023811717EBBCAC00990C9B /* RootViewController.mm */, - ); - path = ios; - sourceTree = ""; - }; - 5023817117EBBE3400990C9B /* mac */ = { - isa = PBXGroup; - children = ( - 5023817217EBBE3400990C9B /* Icon.icns */, - 5023817317EBBE3400990C9B /* Info.plist */, - 5023817417EBBE3400990C9B /* main.cpp */, - 5023817517EBBE3400990C9B /* Prefix.pch */, - ); - path = mac; - sourceTree = ""; - }; - 5091734A17ECE18300D62437 /* Icons */ = { - isa = PBXGroup; - children = ( - 5091733017ECE17A00D62437 /* Icon-29.png */, - 5091733117ECE17A00D62437 /* Icon-40.png */, - 5091733217ECE17A00D62437 /* Icon-50.png */, - 5091733317ECE17A00D62437 /* Icon-58.png */, - 5091733417ECE17A00D62437 /* Icon-80.png */, - 5091733517ECE17A00D62437 /* Icon-100.png */, - 5023810C17EBBCAC00990C9B /* Icon-114.png */, - 5023810D17EBBCAC00990C9B /* Icon-120.png */, - 5023810E17EBBCAC00990C9B /* Icon-144.png */, - 5023810F17EBBCAC00990C9B /* Icon-152.png */, - 5023811017EBBCAC00990C9B /* Icon-57.png */, - 5023811117EBBCAC00990C9B /* Icon-72.png */, - 5023811217EBBCAC00990C9B /* Icon-76.png */, - ); - name = Icons; - sourceTree = ""; - }; - F293B3BD15EB7BE500256477 = { - isa = PBXGroup; - children = ( - 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */, - 5023810617EBBCAC00990C9B /* ios */, - 5023817117EBBE3400990C9B /* mac */, - F293BB7C15EB830F00256477 /* Classes */, - F293B3CB15EB7BE500256477 /* Frameworks */, - 1A0227A417A3AA1A00B867AD /* Lua Common */, - F293B3C915EB7BE500256477 /* Products */, - F293BC4615EB859D00256477 /* Resources */, - ); - sourceTree = ""; - }; - F293B3C915EB7BE500256477 /* Products */ = { - isa = PBXGroup; - children = ( - F293B3C815EB7BE500256477 /* HelloLua iOS.app */, - 5023816B17EBBCE400990C9B /* HelloLua Mac.app */, - ); - name = Products; - sourceTree = ""; - }; - F293B3CB15EB7BE500256477 /* Frameworks */ = { - isa = PBXGroup; - children = ( - 15A8A4871834C90E00142BE0 /* libcurl.dylib */, - D6B061341803AC000077942B /* CoreMotion.framework */, - 50D7C96F17EBBEEC005D0B91 /* IOKit.framework */, - 50D7C96D17EBBEE6005D0B91 /* AppKit.framework */, - 50D7C96B17EBBEDF005D0B91 /* OpenGL.framework */, - 50805AAE17EBBEAA004CFAD3 /* UIKit.framework */, - 5023817917EBBE8300990C9B /* OpenGLES.framework */, - 1AF4C402178663F200122817 /* libz.dylib */, - 15C1568D1683131500D239F2 /* libcurl.a */, - F293B3CC15EB7BE500256477 /* QuartzCore.framework */, - F293B3CE15EB7BE500256477 /* OpenGLES.framework */, - F293B3D015EB7BE500256477 /* OpenAL.framework */, - F293B3D215EB7BE500256477 /* AudioToolbox.framework */, - F293B3D415EB7BE500256477 /* AVFoundation.framework */, - F293B3D615EB7BE500256477 /* UIKit.framework */, - F293B3D815EB7BE500256477 /* Foundation.framework */, - F293B3DA15EB7BE500256477 /* CoreGraphics.framework */, - ); - name = Frameworks; - sourceTree = ""; - }; - F293BB7C15EB830F00256477 /* Classes */ = { - isa = PBXGroup; - children = ( - F293BB7E15EB831F00256477 /* AppDelegate.cpp */, - F293BB7F15EB831F00256477 /* AppDelegate.h */, - ); - name = Classes; - sourceTree = ""; - }; - F293BC4615EB859D00256477 /* Resources */ = { - isa = PBXGroup; - children = ( - 15FFA0FC1894DDEF00C96D45 /* mobdebug.lua */, - 1AC3622316D47C5C000847F2 /* background.mp3 */, - 1AC3622416D47C5C000847F2 /* background.ogg */, - 1AC3622516D47C5C000847F2 /* crop.png */, - 1AC3622616D47C5C000847F2 /* dog.png */, - 1AC3622716D47C5C000847F2 /* effect1.wav */, - 1AC3622816D47C5C000847F2 /* farm.jpg */, - 1AC3622916D47C5C000847F2 /* fonts */, - 1AC3622A16D47C5C000847F2 /* hello.lua */, - 1AC3622B16D47C5C000847F2 /* hello2.lua */, - 1AC3622C16D47C5C000847F2 /* land.png */, - 1AC3622D16D47C5C000847F2 /* menu1.png */, - 1AC3622E16D47C5C000847F2 /* menu2.png */, - ); - name = Resources; - path = ../Resources; - sourceTree = ""; - }; -/* End PBXGroup section */ - -/* Begin PBXNativeTarget section */ - 5023812617EBBCE400990C9B /* HelloLua Mac */ = { - isa = PBXNativeTarget; - buildConfigurationList = 5023816817EBBCE400990C9B /* Build configuration list for PBXNativeTarget "HelloLua Mac" */; - buildPhases = ( - 5023813117EBBCE400990C9B /* Sources */, - 5023813617EBBCE400990C9B /* Frameworks */, - 5023814617EBBCE400990C9B /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "HelloLua Mac"; - productName = HelloLua; - productReference = 5023816B17EBBCE400990C9B /* HelloLua Mac.app */; - productType = "com.apple.product-type.application"; - }; - F293B3C715EB7BE500256477 /* HelloLua iOS */ = { - isa = PBXNativeTarget; - buildConfigurationList = F293B6C415EB7BEA00256477 /* Build configuration list for PBXNativeTarget "HelloLua iOS" */; - buildPhases = ( - F293B3C415EB7BE500256477 /* Sources */, - F293B3C515EB7BE500256477 /* Frameworks */, - F293B3C615EB7BE500256477 /* Resources */, - ); - buildRules = ( - ); - dependencies = ( - ); - name = "HelloLua iOS"; - productName = HelloLua; - productReference = F293B3C815EB7BE500256477 /* HelloLua iOS.app */; - productType = "com.apple.product-type.application"; - }; -/* End PBXNativeTarget section */ - -/* Begin PBXProject section */ - F293B3BF15EB7BE500256477 /* Project object */ = { - isa = PBXProject; - attributes = { - LastUpgradeCheck = 0500; - TargetAttributes = { - F293B3C715EB7BE500256477 = { - DevelopmentTeam = MDDB52YB8L; - }; - }; - }; - buildConfigurationList = F293B3C215EB7BE500256477 /* Build configuration list for PBXProject "HelloLua" */; - compatibilityVersion = "Xcode 3.2"; - developmentRegion = English; - hasScannedForEncodings = 0; - knownRegions = ( - en, - ); - mainGroup = F293B3BD15EB7BE500256477; - productRefGroup = F293B3C915EB7BE500256477 /* Products */; - projectDirPath = ""; - projectReferences = ( - { - ProductGroup = 15A8A4041834BDA200142BE0 /* Products */; - ProjectRef = 15A8A4031834BDA200142BE0 /* cocos2d_libs.xcodeproj */; - }, - ); - projectRoot = ""; - targets = ( - F293B3C715EB7BE500256477 /* HelloLua iOS */, - 5023812617EBBCE400990C9B /* HelloLua Mac */, - ); - }; -/* End PBXProject section */ - -/* Begin PBXReferenceProxy section */ - 15A8A4171834BDA200142BE0 /* libcocos2dx Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx Mac.a"; - remoteRef = 15A8A4161834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4191834BDA200142BE0 /* libcocos2dx-extensions Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx-extensions Mac.a"; - remoteRef = 15A8A4181834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A41B1834BDA200142BE0 /* libchipmunk Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libchipmunk Mac.a"; - remoteRef = 15A8A41A1834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A41D1834BDA200142BE0 /* libbox2d Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libbox2d Mac.a"; - remoteRef = 15A8A41C1834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A41F1834BDA200142BE0 /* libCocosDenshion Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libCocosDenshion Mac.a"; - remoteRef = 15A8A41E1834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4211834BDA200142BE0 /* libjsbindings Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsbindings Mac.a"; - remoteRef = 15A8A4201834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4231834BDA200142BE0 /* libluabindings Mac.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libluabindings Mac.a"; - remoteRef = 15A8A4221834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4251834BDA200142BE0 /* libcocos2dx iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx iOS.a"; - remoteRef = 15A8A4241834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4271834BDA200142BE0 /* libcocos2dx-extensions iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libcocos2dx-extensions iOS.a"; - remoteRef = 15A8A4261834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4291834BDA200142BE0 /* libchipmunk iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libchipmunk iOS.a"; - remoteRef = 15A8A4281834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A42B1834BDA200142BE0 /* libbox2d iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libbox2d iOS.a"; - remoteRef = 15A8A42A1834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A42D1834BDA200142BE0 /* libCocosDenshion iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libCocosDenshion iOS.a"; - remoteRef = 15A8A42C1834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A42F1834BDA200142BE0 /* libjsbindings iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libjsbindings iOS.a"; - remoteRef = 15A8A42E1834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; - 15A8A4311834BDA200142BE0 /* libluabindings iOS.a */ = { - isa = PBXReferenceProxy; - fileType = archive.ar; - path = "libluabindings iOS.a"; - remoteRef = 15A8A4301834BDA200142BE0 /* PBXContainerItemProxy */; - sourceTree = BUILT_PRODUCTS_DIR; - }; -/* End PBXReferenceProxy section */ - -/* Begin PBXResourcesBuildPhase section */ - 5023814617EBBCE400990C9B /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 15A8A4711834C6AD00142BE0 /* DeprecatedEnum.lua in Resources */, - 15FFA0FE1894DDEF00C96D45 /* mobdebug.lua in Resources */, - 5023814817EBBCE400990C9B /* background.mp3 in Resources */, - 5023814917EBBCE400990C9B /* background.ogg in Resources */, - 5023814A17EBBCE400990C9B /* crop.png in Resources */, - 15A8A4811834C6AD00142BE0 /* StudioConstants.lua in Resources */, - 15A8A4791834C6AD00142BE0 /* luaj.lua in Resources */, - 15A8A4671834C6AD00142BE0 /* CCBReaderLoad.lua in Resources */, - 5023814B17EBBCE400990C9B /* dog.png in Resources */, - 5023814D17EBBCE400990C9B /* effect1.wav in Resources */, - 15A8A46B1834C6AD00142BE0 /* Cocos2dConstants.lua in Resources */, - 5023814F17EBBCE400990C9B /* farm.jpg in Resources */, - 15A8A4771834C6AD00142BE0 /* json.lua in Resources */, - 15A8A46F1834C6AD00142BE0 /* DeprecatedClass.lua in Resources */, - 15A8A47F1834C6AD00142BE0 /* OpenglConstants.lua in Resources */, - 5023815017EBBCE400990C9B /* fonts in Resources */, - 15A8A47D1834C6AD00142BE0 /* Opengl.lua in Resources */, - 15A8A4691834C6AD00142BE0 /* Cocos2d.lua in Resources */, - 15A8A4731834C6AD00142BE0 /* DeprecatedOpenglEnum.lua in Resources */, - 5023815117EBBCE400990C9B /* hello.lua in Resources */, - 15A8A46D1834C6AD00142BE0 /* Deprecated.lua in Resources */, - 5023815217EBBCE400990C9B /* hello2.lua in Resources */, - 15A8A4751834C6AD00142BE0 /* DrawPrimitives.lua in Resources */, - 15A8A47B1834C6AD00142BE0 /* luaoc.lua in Resources */, - 5023815317EBBCE400990C9B /* land.png in Resources */, - 5023815617EBBCE400990C9B /* menu1.png in Resources */, - 5023815717EBBCE400990C9B /* menu2.png in Resources */, - 5023817617EBBE3400990C9B /* Icon.icns in Resources */, - 15A8A4651834C6AD00142BE0 /* AudioEngine.lua in Resources */, - 01A8D332187A504A001CC002 /* CocoStudio.lua in Resources */, - 01A8D334187A504A001CC002 /* extern.lua in Resources */, - 01A8D336187A504A001CC002 /* GuiConstants.lua in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F293B3C615EB7BE500256477 /* Resources */ = { - isa = PBXResourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 15A8A46E1834C6AD00142BE0 /* DeprecatedClass.lua in Resources */, - 15A8A4491834C64F00142BE0 /* Icon-114.png in Resources */, - 5023811D17EBBCAC00990C9B /* Icon-120.png in Resources */, - 15A8A47E1834C6AD00142BE0 /* OpenglConstants.lua in Resources */, - 5091733B17ECE17A00D62437 /* Icon-100.png in Resources */, - 15A8A4781834C6AD00142BE0 /* luaj.lua in Resources */, - 1AC3622F16D47C5C000847F2 /* background.mp3 in Resources */, - 1AC3623016D47C5C000847F2 /* background.ogg in Resources */, - 1AC3623116D47C5C000847F2 /* crop.png in Resources */, - 15A8A47C1834C6AD00142BE0 /* Opengl.lua in Resources */, - 15A8A4741834C6AD00142BE0 /* DrawPrimitives.lua in Resources */, - 1AC3623216D47C5C000847F2 /* dog.png in Resources */, - 5023811B17EBBCAC00990C9B /* Default@2x.png in Resources */, - 1AC3623316D47C5C000847F2 /* effect1.wav in Resources */, - 15A8A4681834C6AD00142BE0 /* Cocos2d.lua in Resources */, - 5091733617ECE17A00D62437 /* Icon-29.png in Resources */, - 15A8A4801834C6AD00142BE0 /* StudioConstants.lua in Resources */, - 5023811917EBBCAC00990C9B /* Default-568h@2x.png in Resources */, - 1AC3623416D47C5C000847F2 /* farm.jpg in Resources */, - 1AC3623516D47C5C000847F2 /* fonts in Resources */, - 15A8A4721834C6AD00142BE0 /* DeprecatedOpenglEnum.lua in Resources */, - 15A8A4701834C6AD00142BE0 /* DeprecatedEnum.lua in Resources */, - 15A8A46A1834C6AD00142BE0 /* Cocos2dConstants.lua in Resources */, - 1AC3623616D47C5C000847F2 /* hello.lua in Resources */, - 5091733917ECE17A00D62437 /* Icon-58.png in Resources */, - 15FFA0FD1894DDEF00C96D45 /* mobdebug.lua in Resources */, - 15A8A4641834C6AD00142BE0 /* AudioEngine.lua in Resources */, - 1AC3623716D47C5C000847F2 /* hello2.lua in Resources */, - 1AC3623816D47C5C000847F2 /* land.png in Resources */, - 15A8A4661834C6AD00142BE0 /* CCBReaderLoad.lua in Resources */, - 5023811F17EBBCAC00990C9B /* Icon-152.png in Resources */, - 5023812017EBBCAC00990C9B /* Icon-57.png in Resources */, - 1AC3623916D47C5C000847F2 /* menu1.png in Resources */, - 15A8A47A1834C6AD00142BE0 /* luaoc.lua in Resources */, - 1AC3623A16D47C5C000847F2 /* menu2.png in Resources */, - 5023812217EBBCAC00990C9B /* Icon-76.png in Resources */, - 15A8A46C1834C6AD00142BE0 /* Deprecated.lua in Resources */, - 5091733A17ECE17A00D62437 /* Icon-80.png in Resources */, - 5091733717ECE17A00D62437 /* Icon-40.png in Resources */, - 5023811E17EBBCAC00990C9B /* Icon-144.png in Resources */, - 15A8A4761834C6AD00142BE0 /* json.lua in Resources */, - 5023811A17EBBCAC00990C9B /* Default.png in Resources */, - 5091733817ECE17A00D62437 /* Icon-50.png in Resources */, - 5023812117EBBCAC00990C9B /* Icon-72.png in Resources */, - 01A8D331187A504A001CC002 /* CocoStudio.lua in Resources */, - 01A8D333187A504A001CC002 /* extern.lua in Resources */, - 01A8D335187A504A001CC002 /* GuiConstants.lua in Resources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXResourcesBuildPhase section */ - -/* Begin PBXSourcesBuildPhase section */ - 5023813117EBBCE400990C9B /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5023813317EBBCE400990C9B /* AppDelegate.cpp in Sources */, - 5023817817EBBE3400990C9B /* main.cpp in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; - F293B3C415EB7BE500256477 /* Sources */ = { - isa = PBXSourcesBuildPhase; - buildActionMask = 2147483647; - files = ( - 5023812517EBBCAC00990C9B /* RootViewController.mm in Sources */, - F293BB9C15EB831F00256477 /* AppDelegate.cpp in Sources */, - 5023812417EBBCAC00990C9B /* main.m in Sources */, - 5023811817EBBCAC00990C9B /* AppController.mm in Sources */, - ); - runOnlyForDeploymentPostprocessing = 0; - }; -/* End PBXSourcesBuildPhase section */ - -/* Begin XCBuildConfiguration section */ - 5023816917EBBCE400990C9B /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = mac/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_MAC, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = mac/Info.plist; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ( - "-image_base", - 100000000, - "-pagezero_size", - 10000, - ); - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/mac $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/external/glfw3/include/mac $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; - }; - name = Debug; - }; - 5023816A17EBBCE400990C9B /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - ARCHS = "$(ARCHS_STANDARD_64_BIT)"; - COMBINE_HIDPI_IMAGES = YES; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = mac/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_MAC, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = mac/Info.plist; - LIBRARY_SEARCH_PATHS = ""; - OTHER_LDFLAGS = ( - "-image_base", - 100000000, - "-pagezero_size", - 10000, - ); - SDKROOT = macosx; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/mac $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/external/glfw3/include/mac $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; - }; - name = Release; - }; - F293B6C215EB7BEA00256477 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - COPY_PHASE_STRIP = NO; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_OPTIMIZATION_LEVEL = 0; - GCC_PREPROCESSOR_DEFINITIONS = ( - DEBUG, - "COCOS2D_DEBUG=1", - USE_FILE32API, - "CC_LUA_ENGINE_ENABLED=1", - "CC_ENABLE_CHIPMUNK_INTEGRATION=1", - ); - GCC_SYMBOLS_PRIVATE_EXTERN = NO; - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "\"$(PROJECT_NAME)/libs/cocos2dx/kazmath/include\"", - "\"$(PROJECT_NAME)/libs/cocos2dx\"", - "\"$(PROJECT_NAME)/libs/CocosDenshion/include\"", - "\"$(SDKROOT)/usr/include/libxml2\"", - "\"$(SRCROOT)/../../cocos2dx/\"", - "\"$(SRCROOT)/../../cocos2dx/kazmath/include\"", - "\"$(SRCROOT)/../../external/lua/tolua\"", - "\"$(SRCROOT)/../../external/lua/src\"", - "$(SRCROOT)/../../external/lua/cocos2dx_support", - "$(SRCROOT)/../../cocos2dx/platform/ios", - "$(SRCROOT)/../../cocos2dx/include", - ); - ONLY_ACTIVE_ARCH = YES; - PRODUCT_NAME = "$(TARGET_NAME)"; - }; - name = Debug; - }; - F293B6C315EB7BEA00256477 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - CLANG_CXX_LANGUAGE_STANDARD = "c++0x"; - CLANG_CXX_LIBRARY = "libc++"; - GCC_C_LANGUAGE_STANDARD = c99; - GCC_PREPROCESSOR_DEFINITIONS = ( - NDEBUG, - USE_FILE32API, - "CC_LUA_ENGINE_ENABLED=1", - "CC_ENABLE_CHIPMUNK_INTEGRATION=1", - ); - GCC_WARN_ABOUT_RETURN_TYPE = YES; - GCC_WARN_UNUSED_VARIABLE = YES; - HEADER_SEARCH_PATHS = ( - "\"$(PROJECT_NAME)/libs/cocos2dx/kazmath/include\"", - "\"$(PROJECT_NAME)/libs/cocos2dx\"", - "\"$(PROJECT_NAME)/libs/CocosDenshion/include\"", - "\"$(SDKROOT)/usr/include/libxml2\"", - "\"$(SRCROOT)/../../cocos2dx/\"", - "\"$(SRCROOT)/../../cocos2dx/kazmath/include\"", - "\"$(SRCROOT)/../../external/lua/tolua\"", - "\"$(SRCROOT)/../../external/lua/src\"", - "$(SRCROOT)/../../external/lua/cocos2dx_support", - "$(SRCROOT)/../../cocos2dx/platform/ios", - "$(SRCROOT)/../../cocos2dx/include", - ); - OTHER_CFLAGS = "-DNS_BLOCK_ASSERTIONS=1"; - PRODUCT_NAME = "$(TARGET_NAME)"; - VALIDATE_PRODUCT = YES; - }; - name = Release; - }; - F293B6C515EB7BEA00256477 /* Debug */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COMPRESS_PNG_FILES = NO; - GCC_DYNAMIC_NO_PIC = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_IPHONE, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = ios/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/ios $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; - }; - name = Debug; - }; - F293B6C615EB7BEA00256477 /* Release */ = { - isa = XCBuildConfiguration; - buildSettings = { - ALWAYS_SEARCH_USER_PATHS = YES; - CODE_SIGN_IDENTITY = "iPhone Developer"; - COMPRESS_PNG_FILES = NO; - GCC_PRECOMPILE_PREFIX_HEADER = YES; - GCC_PREFIX_HEADER = ios/Prefix.pch; - GCC_PREPROCESSOR_DEFINITIONS = ( - CC_TARGET_OS_IPHONE, - "$(inherited)", - ); - HEADER_SEARCH_PATHS = ""; - INFOPLIST_FILE = ios/Info.plist; - IPHONEOS_DEPLOYMENT_TARGET = 5.0; - LIBRARY_SEARCH_PATHS = ""; - SDKROOT = iphoneos; - TARGETED_DEVICE_FAMILY = "1,2"; - USER_HEADER_SEARCH_PATHS = "$(inherited) $(SRCROOT)/../cocos2d/cocos $(SRCROOT)/../cocos2d/cocos/base $(SRCROOT)/../cocos2d/cocos/2d $(SRCROOT)/../cocos2d/cocos/physics $(SRCROOT)/../cocos2d/cocos/math/kazmath/include $(SRCROOT)/../cocos2d/cocos/2d/platform/ios $(SRCROOT)/../cocos2d/cocos/audio/include $(SRCROOT)/../cocos2d/cocos/editor-support $(SRCROOT)/../cocos2d/cocos/gui $(SRCROOT)/../cocos2d/external/chipmunk/include/chipmunk $(SRCROOT)/../cocos2d/external $(SRCROOT)/../cocos2d/cocos/scripting/lua/bindings $(SRCROOT)/../cocos2d/external/lua/luajit/include $(SRCROOT)/../cocos2d/external/lua/tolua"; - }; - name = Release; - }; -/* End XCBuildConfiguration section */ - -/* Begin XCConfigurationList section */ - 5023816817EBBCE400990C9B /* Build configuration list for PBXNativeTarget "HelloLua Mac" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - 5023816917EBBCE400990C9B /* Debug */, - 5023816A17EBBCE400990C9B /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F293B3C215EB7BE500256477 /* Build configuration list for PBXProject "HelloLua" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F293B6C215EB7BEA00256477 /* Debug */, - F293B6C315EB7BEA00256477 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; - F293B6C415EB7BEA00256477 /* Build configuration list for PBXNativeTarget "HelloLua iOS" */ = { - isa = XCConfigurationList; - buildConfigurations = ( - F293B6C515EB7BEA00256477 /* Debug */, - F293B6C615EB7BEA00256477 /* Release */, - ); - defaultConfigurationIsVisible = 0; - defaultConfigurationName = Release; - }; -/* End XCConfigurationList section */ - }; - rootObject = F293B3BF15EB7BE500256477 /* Project object */; -} diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/AppController.h b/templates/multi-platform-lua/proj.ios_mac/ios/AppController.h deleted file mode 100644 index ee440a30a8..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/AppController.h +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -@class RootViewController; - -@interface AppController : NSObject { - UIWindow *window; - RootViewController *viewController; -} - -@end - diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/AppController.mm b/templates/multi-platform-lua/proj.ios_mac/ios/AppController.mm deleted file mode 100644 index d0a96a28ec..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/AppController.mm +++ /dev/null @@ -1,143 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ -#import -#import "AppController.h" -#import "cocos2d.h" -#import "CCEAGLView.h" -#import "AppDelegate.h" - -#import "RootViewController.h" - -@implementation AppController - -#pragma mark - -#pragma mark Application lifecycle - -// cocos2d application instance -static AppDelegate s_sharedApplication; - -- (BOOL)application:(UIApplication *)application didFinishLaunchingWithOptions:(NSDictionary *)launchOptions { - - // Override point for customization after application launch. - - // Add the view controller's view to the window and display. - window = [[UIWindow alloc] initWithFrame: [[UIScreen mainScreen] bounds]]; - CCEAGLView *eaglView = [CCEAGLView viewWithFrame: [window bounds] - pixelFormat: kEAGLColorFormatRGBA8 - depthFormat: GL_DEPTH_COMPONENT16 - preserveBackbuffer: NO - sharegroup: nil - multiSampling: NO - numberOfSamples: 0 ]; - - [eaglView setMultipleTouchEnabled:YES]; - // Use RootViewController manage CCEAGLView - viewController = [[RootViewController alloc] initWithNibName:nil bundle:nil]; - viewController.wantsFullScreenLayout = YES; - viewController.view = eaglView; - - // Set RootViewController to window - if ( [[UIDevice currentDevice].systemVersion floatValue] < 6.0) - { - // warning: addSubView doesn't work on iOS6 - [window addSubview: viewController.view]; - } - else - { - // use this method on ios6 - [window setRootViewController:viewController]; - } - - [window makeKeyAndVisible]; - - [[UIApplication sharedApplication] setStatusBarHidden: YES]; - - // IMPORTANT: Setting the GLView should be done after creating the RootViewController - cocos2d::GLView *glview = cocos2d::GLView::createWithEAGLView(eaglView); - cocos2d::Director::getInstance()->setOpenGLView(glview); - - cocos2d::Application::getInstance()->run(); - return YES; -} - - -- (void)applicationWillResignActive:(UIApplication *)application { - /* - Sent when the application is about to move from active to inactive state. This can occur for certain types of temporary interruptions (such as an incoming phone call or SMS message) or when the user quits the application and it begins the transition to the background state. - Use this method to pause ongoing tasks, disable timers, and throttle down OpenGL ES frame rates. Games should use this method to pause the game. - */ - //We don't need to call this method any more. It will interupt user defined game pause&resume logic - /* cocos2d::Director::getInstance()->pause(); */ -} - -- (void)applicationDidBecomeActive:(UIApplication *)application { - /* - Restart any tasks that were paused (or not yet started) while the application was inactive. If the application was previously in the background, optionally refresh the user interface. - */ - //We don't need to call this method any more. It will interupt user defined game pause&resume logic - /* cocos2d::Director::getInstance()->resume(); */ -} - -- (void)applicationDidEnterBackground:(UIApplication *)application { - /* - Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later. - If your application supports background execution, called instead of applicationWillTerminate: when the user quits. - */ - cocos2d::Application::getInstance()->applicationDidEnterBackground(); -} - -- (void)applicationWillEnterForeground:(UIApplication *)application { - /* - Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background. - */ - cocos2d::Application::getInstance()->applicationWillEnterForeground(); -} - -- (void)applicationWillTerminate:(UIApplication *)application { - /* - Called when the application is about to terminate. - See also applicationDidEnterBackground:. - */ -} - - -#pragma mark - -#pragma mark Memory management - -- (void)applicationDidReceiveMemoryWarning:(UIApplication *)application { - /* - Free up as much memory as possible by purging cached data objects that can be recreated (or reloaded from disk) later. - */ - cocos2d::Director::getInstance()->purgeCachedData(); -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end - diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id b/templates/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id deleted file mode 100644 index 8f5838f3a8..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/Default-568h@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -66c6d1cead373b45218424f6a82f370897e443e4 \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id b/templates/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id deleted file mode 100644 index 8843505b20..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/Default@2x.png.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -84689888a14a2123d2b39f7f2f61be8c15207479 \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/Prefix.pch b/templates/multi-platform-lua/proj.ios_mac/ios/Prefix.pch deleted file mode 100644 index b4311a0a3d..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/Prefix.pch +++ /dev/null @@ -1,8 +0,0 @@ -// -// Prefix header for all source files of the 'HelloLua' target in the 'HelloLua' project -// - -#ifdef __OBJC__ - #import - #import -#endif diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.h b/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.h deleted file mode 100644 index a68782316e..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.h +++ /dev/null @@ -1,33 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -#import - - -@interface RootViewController : UIViewController { - -} -- (BOOL)prefersStatusBarHidden; -@end diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm b/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm deleted file mode 100644 index 2374fae2d2..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/RootViewController.mm +++ /dev/null @@ -1,108 +0,0 @@ -/**************************************************************************** - Copyright (c) 2013 cocos2d-x.org - Copyright (c) 2013-2014 Chukong Technologies 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. - ****************************************************************************/ - -#import "RootViewController.h" -#import "cocos2d.h" -#import "CCEAGLView.h" - -@implementation RootViewController - -/* - // The designated initializer. Override if you create the controller programmatically and want to perform customization that is not appropriate for viewDidLoad. -- (id)initWithNibName:(NSString *)nibNameOrNil bundle:(NSBundle *)nibBundleOrNil { - if ((self = [super initWithNibName:nibNameOrNil bundle:nibBundleOrNil])) { - // Custom initialization - } - return self; -} -*/ - -/* -// Implement loadView to create a view hierarchy programmatically, without using a nib. -- (void)loadView { -} -*/ - -/* -// Implement viewDidLoad to do additional setup after loading the view, typically from a nib. -- (void)viewDidLoad { - [super viewDidLoad]; -} - -*/ -// Override to allow orientations other than the default portrait orientation. -// This method is deprecated on ios6 -- (BOOL)shouldAutorotateToInterfaceOrientation:(UIInterfaceOrientation)interfaceOrientation { - return UIInterfaceOrientationIsLandscape( interfaceOrientation ); -} - -// For ios6, use supportedInterfaceOrientations & shouldAutorotate instead -- (NSUInteger) supportedInterfaceOrientations{ -#ifdef __IPHONE_6_0 - return UIInterfaceOrientationMaskAllButUpsideDown; -#endif -} - -- (BOOL) shouldAutorotate { - return YES; -} - -- (void)didRotateFromInterfaceOrientation:(UIInterfaceOrientation)fromInterfaceOrientation { - [super didRotateFromInterfaceOrientation:fromInterfaceOrientation]; - - cocos2d::GLView *glview = cocos2d::Director::getInstance()->getOpenGLView(); - CCEAGLView *eaglview = (CCEAGLView*) glview->getEAGLView(); - - CGSize s = CGSizeMake([eaglview getWidth], [eaglview getHeight]); - - cocos2d::Application::getInstance()->applicationScreenSizeChanged((int) s.width, (int) s.height); -} - -//fix not hide status on ios7 -- (BOOL)prefersStatusBarHidden -{ - return YES; -} - -- (void)didReceiveMemoryWarning { - // Releases the view if it doesn't have a superview. - [super didReceiveMemoryWarning]; - - // Release any cached data, images, etc that aren't in use. -} - -- (void)viewDidUnload { - [super viewDidUnload]; - // Release any retained subviews of the main view. - // e.g. self.myOutlet = nil; -} - - -- (void)dealloc { - [super dealloc]; -} - - -@end diff --git a/templates/multi-platform-lua/proj.ios_mac/ios/main.m b/templates/multi-platform-lua/proj.ios_mac/ios/main.m deleted file mode 100644 index 4135c21f5d..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/ios/main.m +++ /dev/null @@ -1,15 +0,0 @@ -// -// main.m -// HelloLua -// -// Copyright __MyCompanyName__ 2011. All rights reserved. -// - -#import - -int main(int argc, char *argv[]) { - NSAutoreleasePool *pool = [NSAutoreleasePool new]; - int retVal = UIApplicationMain(argc, argv, nil, @"AppController"); - [pool release]; - return retVal; -} diff --git a/templates/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id b/templates/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id deleted file mode 100644 index 0c90afdb6d..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/mac/Icon.icns.REMOVED.git-id +++ /dev/null @@ -1 +0,0 @@ -2040fc6fe624353ae1d3db50cd3d450f4fda5afc \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.ios_mac/mac/Prefix.pch b/templates/multi-platform-lua/proj.ios_mac/mac/Prefix.pch deleted file mode 100644 index 46c36a7e99..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/mac/Prefix.pch +++ /dev/null @@ -1,7 +0,0 @@ -// -// Prefix header for all source files of the 'Paralaxer' target in the 'Paralaxer' project -// - -#ifdef __OBJC__ - #import -#endif diff --git a/templates/multi-platform-lua/proj.ios_mac/mac/main.cpp b/templates/multi-platform-lua/proj.ios_mac/mac/main.cpp deleted file mode 100644 index 96f027e13d..0000000000 --- a/templates/multi-platform-lua/proj.ios_mac/mac/main.cpp +++ /dev/null @@ -1,34 +0,0 @@ -/**************************************************************************** - Copyright (c) 2010 cocos2d-x.org - - http://www.cocos2d-x.org - - Permission is hereby granted, free of charge, to any person obtaining a copy - of this software and associated documentation files (the "Software"), to deal - in the Software without restriction, including without limitation the rights - to use, copy, modify, merge, publish, distribute, sublicense, and/or sell - copies of the Software, and to permit persons to whom the Software is - furnished to do so, subject to the following conditions: - - The above copyright notice and this permission notice shall be included in - all copies or substantial portions of the Software. - - THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR - IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, - FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE - AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER - LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, - OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN - THE SOFTWARE. - ****************************************************************************/ - -#include "AppDelegate.h" -#include "cocos2d.h" - -USING_NS_CC; - -int main(int argc, char *argv[]) -{ - AppDelegate app; - return Application::getInstance()->run(); -} diff --git a/templates/multi-platform-lua/proj.linux/main.cpp b/templates/multi-platform-lua/proj.linux/main.cpp deleted file mode 100644 index c5b735da78..0000000000 --- a/templates/multi-platform-lua/proj.linux/main.cpp +++ /dev/null @@ -1,15 +0,0 @@ -#include "../Classes/AppDelegate.h" - -#include -#include -#include -#include - -USING_NS_CC; - -int main(int argc, char **argv) -{ - // create the application instance - AppDelegate app; - return Application::getInstance()->run(); -} diff --git a/templates/multi-platform-lua/proj.win32/HelloLua.sln b/templates/multi-platform-lua/proj.win32/HelloLua.sln deleted file mode 100644 index 5f6caa40b0..0000000000 --- a/templates/multi-platform-lua/proj.win32/HelloLua.sln +++ /dev/null @@ -1,93 +0,0 @@ - -Microsoft Visual Studio Solution File, Format Version 12.00 -# Visual Studio 2012 -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "HelloLua", "HelloLua.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}" - ProjectSection(ProjectDependencies) = postProject - {21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28} - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} = {B7C2A162-DEC9-4418-972E-240AB3CBFCAE} - {DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159} - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "..\cocos2d\extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}" - ProjectSection(ProjectDependencies) = postProject - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25} - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} - EndProjectSection -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libchipmunk", "..\cocos2d\external\chipmunk\proj.win32\chipmunk.vcxproj", "{207BC7A9-CCF1-4F2F-A04D-45F72242AE25}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libcocos2d", "..\cocos2d\cocos\2d\cocos2d.vcxproj", "{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libAudio", "..\cocos2d\cocos\audio\proj.win32\CocosDenshion.vcxproj", "{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "liblua", "..\cocos2d\cocos\scripting\lua\bindings\liblua.vcxproj", "{DDC3E27F-004D-4DD4-9DD3-931A013D2159}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libNetwork", "..\cocos2d\cocos\network\proj.win32\libNetwork.vcxproj", "{DF2638C0-8128-4847-867C-6EAFE3DEE7B5}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosBuilder", "..\cocos2d\cocos\editor-support\cocosbuilder\proj.win32\libCocosBuilder.vcxproj", "{811C0DAB-7B96-4BD3-A154-B7572B58E4AB}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libCocosStudio", "..\cocos2d\cocos\editor-support\cocostudio\proj.win32\libCocosStudio.vcxproj", "{B57CF53F-2E49-4031-9822-047CC0E6BDE2}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libGUI", "..\cocos2d\cocos\gui\proj.win32\libGUI.vcxproj", "{7E06E92C-537A-442B-9E4A-4761C84F8A1A}" -EndProject -Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libSpine", "..\cocos2d\cocos\editor-support\spine\proj.win32\libSpine.vcxproj", "{B7C2A162-DEC9-4418-972E-240AB3CBFCAE}" -EndProject -Global - GlobalSection(SolutionConfigurationPlatforms) = preSolution - Debug|Win32 = Debug|Win32 - Release|Win32 = Release|Win32 - EndGlobalSection - GlobalSection(ProjectConfigurationPlatforms) = postSolution - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32 - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.ActiveCfg = Debug|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32 - {21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.ActiveCfg = Debug|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Debug|Win32.Build.0 = Debug|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.ActiveCfg = Release|Win32 - {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}.Release|Win32.Build.0 = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.ActiveCfg = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Debug|Win32.Build.0 = Debug|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.ActiveCfg = Release|Win32 - {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}.Release|Win32.Build.0 = Release|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.ActiveCfg = Debug|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Debug|Win32.Build.0 = Debug|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.ActiveCfg = Release|Win32 - {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}.Release|Win32.Build.0 = Release|Win32 - {DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.ActiveCfg = Debug|Win32 - {DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Debug|Win32.Build.0 = Debug|Win32 - {DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.ActiveCfg = Release|Win32 - {DDC3E27F-004D-4DD4-9DD3-931A013D2159}.Release|Win32.Build.0 = Release|Win32 - {DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.ActiveCfg = Debug|Win32 - {DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Debug|Win32.Build.0 = Debug|Win32 - {DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.ActiveCfg = Release|Win32 - {DF2638C0-8128-4847-867C-6EAFE3DEE7B5}.Release|Win32.Build.0 = Release|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.ActiveCfg = Debug|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Debug|Win32.Build.0 = Debug|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.ActiveCfg = Release|Win32 - {811C0DAB-7B96-4BD3-A154-B7572B58E4AB}.Release|Win32.Build.0 = Release|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.ActiveCfg = Debug|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Debug|Win32.Build.0 = Debug|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.ActiveCfg = Release|Win32 - {B57CF53F-2E49-4031-9822-047CC0E6BDE2}.Release|Win32.Build.0 = Release|Win32 - {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.ActiveCfg = Debug|Win32 - {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Debug|Win32.Build.0 = Debug|Win32 - {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.ActiveCfg = Release|Win32 - {7E06E92C-537A-442B-9E4A-4761C84F8A1A}.Release|Win32.Build.0 = Release|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.ActiveCfg = Debug|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Debug|Win32.Build.0 = Debug|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.ActiveCfg = Release|Win32 - {B7C2A162-DEC9-4418-972E-240AB3CBFCAE}.Release|Win32.Build.0 = Release|Win32 - EndGlobalSection - GlobalSection(SolutionProperties) = preSolution - HideSolutionNode = FALSE - EndGlobalSection -EndGlobal diff --git a/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj b/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj deleted file mode 100644 index dade088c62..0000000000 --- a/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj +++ /dev/null @@ -1,212 +0,0 @@ - - - - - Debug - Win32 - - - Release - Win32 - - - - {4E6A7A0E-DDD8-4BAA-8B22-C964069364ED} - HelloLua - - - - Application - true - Unicode - v100 - v110 - v110_xp - - - Application - false - Unicode - v100 - v110 - v110_xp - - - - - - - - - - - - - - - - - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - true - $(IncludePath) - $(SourcePath); - AllRules.ruleset - - - $(SolutionDir)$(Configuration).win32\ - $(Configuration).win32\ - false - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\lib;$(LibraryPath) - - - - $(ProjectDir)..\Classes;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\lua-bindings;$(EngineRoot)cocos\scripting\lua\bindings;$(EngineRoot)external;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\lua;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - - - Level3 - MultiThreadedDebugDLL - false - EditAndContinue - EnableFastChecks - Disabled - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS_DEBUG;COCOS2D_DEBUG=1;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - true - - - Windows - MachineX86 - true - $(OutDir);%(AdditionalLibraryDirectories) - libcurl_imp.lib;lua51.lib;websockets.lib;%(AdditionalDependencies) - - - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - _DEBUG;%(PreprocessorDefinitions) - - - false - Win32 - _DEBUG;%(PreprocessorDefinitions) - HelloLua.h - HelloLua_i.c - HelloLua_p.c - true - $(IntDir)/HelloLua.tlb - - - - - xcopy "$(ProjectDir)..\cocos2d\cocos\scripting\lua\script" "$(ProjectDir)..\Resources" /e /Y - - - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\cocos2d\external\websockets\prebuilt\win32\*.*" "$(OutDir)" - - - - - $(ProjectDir)..\Classes;$(EngineRoot)cocos\audio\include;$(EngineRoot)cocos\scripting\auto-generated\lua-bindings;$(EngineRoot)cocos\scripting\lua\bindings;$(EngineRoot)external;$(EngineRoot)external\lua\tolua;$(EngineRoot)external\lua\lua;$(EngineRoot)external\chipmunk\include\chipmunk;%(AdditionalIncludeDirectories) - - - Level3 - MultiThreadedDLL - - - - - WIN32;_WINDOWS;STRICT;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGSNDEBUG;%(PreprocessorDefinitions) - 4267;4251;4244;%(DisableSpecificWarnings) - true - - - Windows - MachineX86 - $(OutDir);%(AdditionalLibraryDirectories) - lua51.lib;websockets.lib;%(AdditionalDependencies) - true - - - 0x0409 - $(MSBuildProgramFiles32)\Microsoft SDKs\Windows\v7.1A\include;$(IntDir);%(AdditionalIncludeDirectories) - NDEBUG;%(PreprocessorDefinitions) - - - false - Win32 - NDEBUG;%(PreprocessorDefinitions) - HelloLua.h - HelloLua_i.c - HelloLua_p.c - true - $(IntDir)/HelloLua.tlb - - - - - - - - - - - if not exist "$(OutDir)" mkdir "$(OutDir)" -xcopy /Y /Q "$(ProjectDir)..\cocos2d\external\websockets\prebuilt\win32\*.*" "$(OutDir)" - - - - - - - - - - - - - - - - {98a51ba8-fc3a-415b-ac8f-8c7bd464e93e} - - - {f8edd7fa-9a51-4e80-baeb-860825d2eac6} - - - {811c0dab-7b96-4bd3-a154-b7572b58e4ab} - - - {b57cf53f-2e49-4031-9822-047cc0e6bde2} - - - {b7c2a162-dec9-4418-972e-240ab3cbfcae} - - - {7e06e92c-537a-442b-9e4a-4761c84f8a1a} - - - {df2638c0-8128-4847-867c-6eafe3dee7b5} - - - {ddc3e27f-004d-4dd4-9dd3-931a013d2159} - - - {21b2c324-891f-48ea-ad1a-5ae13de12e28} - - - {207bc7a9-ccf1-4f2f-a04d-45f72242ae25} - - - - - - \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters b/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters deleted file mode 100644 index d1c7475e23..0000000000 --- a/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.filters +++ /dev/null @@ -1,35 +0,0 @@ - - - - - {fc5cb953-2953-4968-83b3-39e3ff951754} - - - {037a9a02-b906-4cc5-ad98-304acd4e25ee} - - - {2d1d0979-58cd-4ab6-b91c-13650158f1fa} - - - - - Classes - - - win32 - - - - - Classes - - - win32 - - - - - resource - - - \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.user b/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.user deleted file mode 100644 index 62b0b77aeb..0000000000 --- a/templates/multi-platform-lua/proj.win32/HelloLua.vcxproj.user +++ /dev/null @@ -1,10 +0,0 @@ - - - - false - $(ProjectDir)..\Resources - $(ProjectDir)..\Resources - WindowsLocalDebugger - WindowsLocalDebugger - - \ No newline at end of file diff --git a/templates/multi-platform-lua/proj.win32/game.rc b/templates/multi-platform-lua/proj.win32/game.rc deleted file mode 100644 index e7b5e3e327..0000000000 --- a/templates/multi-platform-lua/proj.win32/game.rc +++ /dev/null @@ -1,86 +0,0 @@ -// Microsoft Visual C++ generated resource script. -// -#include "resource.h" - -#define APSTUDIO_READONLY_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -// -// Generated from the TEXTINCLUDE 2 resource. -// -#define APSTUDIO_HIDDEN_SYMBOLS -#include "windows.h" -#undef APSTUDIO_HIDDEN_SYMBOLS -///////////////////////////////////////////////////////////////////////////// -#undef APSTUDIO_READONLY_SYMBOLS - -///////////////////////////////////////////////////////////////////////////// -// English (U.S.) resources - -#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) -#ifdef _WIN32 -LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US -#pragma code_page(1252) -#endif //_WIN32 - -#ifdef APSTUDIO_INVOKED -///////////////////////////////////////////////////////////////////////////// -// -// TEXTINCLUDE -// - -1 TEXTINCLUDE -BEGIN - "resource.h\0" -END - -#endif // APSTUDIO_INVOKED - -///////////////////////////////////////////////////////////////////////////// -// -// Icon -// - -// Icon with lowest ID value placed first to ensure application icon -// remains consistent on all systems. -GLFW_ICON ICON "res\\game.ico" - -///////////////////////////////////////////////////////////////////////////// -// -// Version -// - -VS_VERSION_INFO VERSIONINFO - FILEVERSION 1,0,0,1 - PRODUCTVERSION 1,0,0,1 - FILEFLAGSMASK 0x3fL -#ifdef _DEBUG - FILEFLAGS 0x1L -#else - FILEFLAGS 0x0L -#endif - FILEOS 0x4L - FILETYPE 0x2L - FILESUBTYPE 0x0L -BEGIN - BLOCK "StringFileInfo" - BEGIN - BLOCK "040904B0" - BEGIN - VALUE "CompanyName", "\0" - VALUE "FileDescription", "HelloLua Module\0" - VALUE "FileVersion", "1, 0, 0, 1\0" - VALUE "InternalName", "HelloLua\0" - VALUE "LegalCopyright", "Copyright \0" - VALUE "OriginalFilename", "HelloLua.exe\0" - VALUE "ProductName", "HelloLua Module\0" - VALUE "ProductVersion", "1, 0, 0, 1\0" - END - END - BLOCK "VarFileInfo" - BEGIN - VALUE "Translation", 0x0409, 0x04B0 - END -END - -///////////////////////////////////////////////////////////////////////////// -#endif // !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU) diff --git a/templates/multi-platform-lua/proj.win32/main.cpp b/templates/multi-platform-lua/proj.win32/main.cpp deleted file mode 100644 index d9b2ddaa2e..0000000000 --- a/templates/multi-platform-lua/proj.win32/main.cpp +++ /dev/null @@ -1,34 +0,0 @@ -#include "main.h" -#include "AppDelegate.h" -#include "cocos2d.h" - -USING_NS_CC; - -// uncomment below line, open debug console -#define USE_WIN32_CONSOLE - -int APIENTRY _tWinMain(HINSTANCE hInstance, - HINSTANCE hPrevInstance, - LPTSTR lpCmdLine, - int nCmdShow) -{ - UNREFERENCED_PARAMETER(hPrevInstance); - UNREFERENCED_PARAMETER(lpCmdLine); - -#ifdef USE_WIN32_CONSOLE - AllocConsole(); - freopen("CONIN$", "r", stdin); - freopen("CONOUT$", "w", stdout); - freopen("CONOUT$", "w", stderr); -#endif - - // create the application instance - AppDelegate app; - int ret = Application::getInstance()->run(); - -#ifdef USE_WIN32_CONSOLE - FreeConsole(); -#endif - - return ret; -} diff --git a/templates/multi-platform-lua/proj.win32/main.h b/templates/multi-platform-lua/proj.win32/main.h deleted file mode 100644 index d756fd1e57..0000000000 --- a/templates/multi-platform-lua/proj.win32/main.h +++ /dev/null @@ -1,10 +0,0 @@ -#ifndef __MAIN_H__ -#define __MAIN_H__ - -#define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers - -// Windows Header Files: -#include -#include - -#endif // __WINMAIN_H__ diff --git a/templates/multi-platform-lua/proj.win32/res/game.ico b/templates/multi-platform-lua/proj.win32/res/game.ico deleted file mode 100644 index feaf932a7465e435af6271bd8204c0145731a6eb..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 47629 zcmeHw2Ut~C_C2VmbW{*T6tMvI-cS^5*boF23l{9X7erK4RIJ#0@4ZH&F|j4F#B>vr zXks*zOomCAk(tS4`u?wV?mO>Ynu?N{`Tf7)`wsWLTh6XKz=;E-cIr zf0gWl+t}F!;#03)#`mi;?CiSXTrj?dA*CSM<39D5VjS}OKRV3LWoAUl(3zc_(`R*Y z{vf%FOUA6Ou1^Y_y5Jd8O2X&oP09GZ*-@@f=Eb-^nIG%+WI<22Ckx};pDga{{v@rR z`;(>pJ)SHd&OqnN}#(6&3Jkj&XmdTz^womhV zvSYee=FXXAKiNIA?54d*W!vwZ>*0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