mirror of https://github.com/axmolengine/axmol.git
Removes unneeded files
New functionality is merged into the 'official' classes
This commit is contained in:
parent
bc34ee7f02
commit
903844c7bd
|
@ -1 +1 @@
|
|||
4691fe42345db3f1c43fc39d5517fd5115fe0520
|
||||
4cd02813dfcd14b7de3ccb157cd0f25b0bce9f37
|
|
@ -33,6 +33,8 @@ THE SOFTWARE.
|
|||
#include "ccGLStateCache.h"
|
||||
#include "CCDirector.h"
|
||||
#include "TransformUtils.h"
|
||||
#include "CCRenderer.h"
|
||||
#include "CCQuadCommand.h"
|
||||
|
||||
// external
|
||||
#include "kazmath/GL/matrix.h"
|
||||
|
@ -137,14 +139,30 @@ void AtlasNode::updateAtlasValues()
|
|||
// AtlasNode - draw
|
||||
void AtlasNode::draw(void)
|
||||
{
|
||||
CC_NODE_DRAW_SETUP();
|
||||
// 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);
|
||||
|
||||
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);
|
||||
auto shader = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP);
|
||||
|
||||
QuadCommand* cmd = QuadCommand::getCommandPool().generateCommand();
|
||||
cmd->init(0,
|
||||
_vertexZ,
|
||||
_textureAtlas->getTexture()->getName(),
|
||||
shader,
|
||||
_blendFunc,
|
||||
_textureAtlas->getQuads(),
|
||||
_textureAtlas->getTotalQuads(),
|
||||
_modelViewTransform);
|
||||
|
||||
Director::getInstance()->getRenderer()->addCommand(cmd);
|
||||
|
||||
_textureAtlas->drawNumberOfQuads(_quadsToDraw, 0);
|
||||
}
|
||||
|
||||
// AtlasNode - RGBA protocol
|
||||
|
|
|
@ -45,7 +45,6 @@ THE SOFTWARE.
|
|||
#include "platform/CCFileUtils.h"
|
||||
#include "CCApplication.h"
|
||||
#include "CCLabelBMFont.h"
|
||||
#include "CCNewLabelAtlas.h"
|
||||
#include "CCActionManager.h"
|
||||
#include "CCAnimationCache.h"
|
||||
#include "CCTouch.h"
|
||||
|
@ -929,17 +928,17 @@ void Director::createStatsLabel()
|
|||
*/
|
||||
float factor = EGLView::getInstance()->getDesignResolutionSize().height / 320.0f;
|
||||
|
||||
_FPSLabel = new NewLabelAtlas;
|
||||
_FPSLabel = new LabelAtlas;
|
||||
_FPSLabel->setIgnoreContentScaleFactor(true);
|
||||
_FPSLabel->initWithString("00.0", texture, 12, 32 , '.');
|
||||
_FPSLabel->setScale(factor);
|
||||
|
||||
_SPFLabel = new NewLabelAtlas;
|
||||
_SPFLabel = new LabelAtlas;
|
||||
_SPFLabel->setIgnoreContentScaleFactor(true);
|
||||
_SPFLabel->initWithString("0.000", texture, 12, 32, '.');
|
||||
_SPFLabel->setScale(factor);
|
||||
|
||||
_drawsLabel = new NewLabelAtlas;
|
||||
_drawsLabel = new LabelAtlas;
|
||||
_drawsLabel->setIgnoreContentScaleFactor(true);
|
||||
_drawsLabel->initWithString("000", texture, 12, 32, '.');
|
||||
_drawsLabel->setScale(factor);
|
||||
|
|
|
@ -26,6 +26,9 @@
|
|||
#include "CCNotificationCenter.h"
|
||||
#include "CCEventType.h"
|
||||
#include "CCConfiguration.h"
|
||||
#include "CCCustomCommand.h"
|
||||
#include "CCDirector.h"
|
||||
#include "CCRenderer.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
@ -237,6 +240,14 @@ void DrawNode::render()
|
|||
}
|
||||
|
||||
void DrawNode::draw()
|
||||
{
|
||||
CustomCommand* cmd = CustomCommand::getCommandPool().generateCommand();
|
||||
cmd->init(0, _vertexZ);
|
||||
cmd->func = CC_CALLBACK_0(DrawNode::onDraw, this);
|
||||
Director::getInstance()->getRenderer()->addCommand(cmd);
|
||||
}
|
||||
|
||||
void DrawNode::onDraw()
|
||||
{
|
||||
CC_NODE_DRAW_SETUP();
|
||||
GL::blendFunc(_blendFunc.src, _blendFunc.dst);
|
||||
|
|
|
@ -84,6 +84,8 @@ public:
|
|||
*/
|
||||
void listenBackToForeground(Object *obj);
|
||||
|
||||
void onDraw();
|
||||
|
||||
// Overrides
|
||||
virtual void draw() override;
|
||||
|
||||
|
|
|
@ -119,9 +119,6 @@ THE SOFTWARE.
|
|||
#include "CCParticleSystemQuad.h"
|
||||
|
||||
// new renderer
|
||||
#include "renderer/CCNewDrawNode.h"
|
||||
#include "renderer/CCNewLabelAtlas.h"
|
||||
#include "renderer/CCNewParticleSystemQuad.h"
|
||||
#include "renderer/CCNewRenderTexture.h"
|
||||
#include "renderer/CCNewSprite.h"
|
||||
#include "renderer/CCNewSpriteBatchNode.h"
|
||||
|
|
|
@ -1,79 +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 "CCNewDrawNode.h"
|
||||
#include "CCQuadCommand.h"
|
||||
#include "CCRenderer.h"
|
||||
#include "CCCustomCommand.h"
|
||||
#include "CCDirector.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
NewDrawNode *NewDrawNode::create()
|
||||
{
|
||||
NewDrawNode* pRet = new NewDrawNode();
|
||||
if (pRet && pRet->init())
|
||||
{
|
||||
pRet->autorelease();
|
||||
}
|
||||
else
|
||||
{
|
||||
CC_SAFE_DELETE(pRet);
|
||||
}
|
||||
|
||||
return pRet;
|
||||
}
|
||||
|
||||
NewDrawNode::NewDrawNode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
NewDrawNode::~NewDrawNode()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
bool NewDrawNode::init()
|
||||
{
|
||||
return DrawNode::init();
|
||||
}
|
||||
|
||||
void NewDrawNode::draw()
|
||||
{
|
||||
CustomCommand* cmd = CustomCommand::getCommandPool().generateCommand();
|
||||
cmd->init(0, _vertexZ);
|
||||
cmd->func = CC_CALLBACK_0(NewDrawNode::onDraw, this);
|
||||
Director::getInstance()->getRenderer()->addCommand(cmd);
|
||||
}
|
||||
|
||||
void NewDrawNode::onDraw()
|
||||
{
|
||||
CC_NODE_DRAW_SETUP();
|
||||
GL::blendFunc(_blendFunc.src, _blendFunc.dst);
|
||||
|
||||
render();
|
||||
}
|
||||
|
||||
NS_CC_END
|
|
@ -1,52 +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 __CCNewDrawNode_H_
|
||||
#define __CCNewDrawNode_H_
|
||||
|
||||
#include "CCPlatformMacros.h"
|
||||
#include "CCDrawNode.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class NewDrawNode : public DrawNode
|
||||
{
|
||||
public:
|
||||
static NewDrawNode* create();
|
||||
|
||||
virtual bool init();
|
||||
|
||||
void draw();
|
||||
|
||||
void onDraw();
|
||||
|
||||
protected:
|
||||
NewDrawNode();
|
||||
virtual ~NewDrawNode();
|
||||
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif //__CCNewDrawNode_H_
|
|
@ -1,67 +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 "CCNewLabelAtlas.h"
|
||||
#include "CCRenderCommand.h"
|
||||
#include "CCRenderer.h"
|
||||
#include "CCQuadCommand.h"
|
||||
#include "CCMenuItem.h"
|
||||
#include "CCFrustum.h"
|
||||
#include "CCDirector.h"
|
||||
#include "CCTextureAtlas.h"
|
||||
#include "CCShaderCache.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
|
||||
void NewLabelAtlas::draw()
|
||||
{
|
||||
// LabelAtlas::draw();
|
||||
// _renderCommand.init(0, _vertexZ, _textureAtlas->getTexture()->getName(), _shaderProgram, _blendFunc,
|
||||
// _textureAtlas->getQuads(), _textureAtlas->getTotalQuads() );
|
||||
//
|
||||
// Renderer::getInstance()->addCommand(&_renderCommand);
|
||||
|
||||
|
||||
auto shader = ShaderCache::getInstance()->getProgram(GLProgram::SHADER_NAME_POSITION_TEXTURE_COLOR_NO_MVP);
|
||||
|
||||
kmMat4 mv;
|
||||
kmGLGetMatrix(KM_GL_MODELVIEW, &mv);
|
||||
|
||||
QuadCommand* cmd = QuadCommand::getCommandPool().generateCommand();
|
||||
cmd->init(0,
|
||||
_vertexZ,
|
||||
_textureAtlas->getTexture()->getName(),
|
||||
shader,
|
||||
_blendFunc,
|
||||
_textureAtlas->getQuads(),
|
||||
_textureAtlas->getTotalQuads(),
|
||||
mv);
|
||||
|
||||
Director::getInstance()->getRenderer()->addCommand(cmd);
|
||||
|
||||
}
|
||||
|
||||
NS_CC_END
|
|
@ -1,50 +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 __CCNEWLABELATLAS_H_
|
||||
#define __CCNEWLABELATLAS_H_
|
||||
|
||||
#include "CCLabelAtlas.h"
|
||||
#include "CCPlatformMacros.h"
|
||||
#include "CCQuadCommand.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class NewLabelAtlas : public LabelAtlas
|
||||
{
|
||||
|
||||
public:
|
||||
NewLabelAtlas() {}
|
||||
virtual ~NewLabelAtlas() {}
|
||||
|
||||
virtual void draw(void) override;
|
||||
|
||||
protected:
|
||||
QuadCommand _renderCommand;
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif /* defined(__CCNEWLABELATLAS_H_) */
|
|
@ -1,26 +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 "CCNewParticleSystemQuad.h"
|
|
@ -1,39 +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 __CCNewParticleSystemQuad_H_
|
||||
#define __CCNewParticleSystemQuad_H_
|
||||
|
||||
#include "CCParticleSystemQuad.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
||||
class NewParticleSystemQuad : public ParticleSystemQuad
|
||||
{
|
||||
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
||||
#endif //__CCNewParticleSystemQuad_H_
|
Loading…
Reference in New Issue