remove unneeded include header files

This commit is contained in:
minggo 2014-08-27 13:39:50 +08:00
Родитель b9c51e6994
Коммит d0ca9a4da5
30 изменённых файлов: 38 добавлений и 117 удалений

Просмотреть файл

@ -32,9 +32,6 @@ THE SOFTWARE.
#include "renderer/CCTextureCache.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"
#include "math/TransformUtils.h"
NS_CC_BEGIN

Просмотреть файл

@ -25,13 +25,11 @@
#include "CCGL.h"
#include "base/CCEventType.h"
#include "base/CCConfiguration.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"
#include "base/CCDirector.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"
#include "renderer/ccGLStateCache.h"
NS_CC_BEGIN

Просмотреть файл

@ -41,13 +41,10 @@ THE SOFTWARE.
#include <string.h>
#include <cmath>
#include "base/ccTypes.h"
#include "base/ccMacros.h"
#include "CCGL.h"
#include "base/CCDirector.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCGLProgramCache.h"
#include "renderer/CCGLProgram.h"
#include "2d/CCActionCatmullRom.h"
#include "renderer/CCRenderer.h"

Просмотреть файл

@ -27,11 +27,12 @@
#define _CCFont_h_
#include <string>
#include "2d/CCLabel.h"
NS_CC_BEGIN
class FontAtlas;
// fwd
class FontAtlas;

Просмотреть файл

@ -27,7 +27,6 @@
#include "base/CCPlatformMacros.h"
#include "base/CCRef.h"
#include "CCStdC.h"
#include <string>
#include <unordered_map>

Просмотреть файл

@ -29,7 +29,8 @@
#include "2d/CCFontFNT.h"
#include "2d/CCFontFreeType.h"
#include "CCFontCharMap.h"
#include "2d/CCFontAtlas.h"
#include "2d/CCFontCharMap.h"
#include "base/CCDirector.h"
NS_CC_BEGIN

Просмотреть файл

@ -28,11 +28,12 @@
#include <unordered_map>
#include "2d/CCFontAtlas.h"
#include "2d/CCLabel.h"
NS_CC_BEGIN
class FontAtlas;
class CC_DLL FontAtlasCache
{
public:

Просмотреть файл

@ -23,10 +23,9 @@
THE SOFTWARE.
****************************************************************************/
#include "CCFontCharMap.h"
#include "2d/CCFontCharMap.h"
#include "2d/CCFontAtlas.h"
#include "platform/CCFileUtils.h"
#include "base/ccUTF8.h"
#include "base/CCDirector.h"
#include "renderer/CCTextureCache.h"

Просмотреть файл

@ -26,7 +26,7 @@
#ifndef _CCFontCharMap_h_
#define _CCFontCharMap_h_
#include "CCFont.h"
#include "2d/CCFont.h"
NS_CC_BEGIN

Просмотреть файл

@ -26,7 +26,6 @@
#include "2d/CCFontFNT.h"
#include "base/uthash.h"
#include "2d/CCFontAtlas.h"
#include "base/ccUTF8.h"
#include "platform/CCFileUtils.h"
#include "base/CCConfiguration.h"
#include "base/CCDirector.h"

Просмотреть файл

@ -25,8 +25,6 @@ THE SOFTWARE.
#include "2d/CCFontFreeType.h"
#include <stdio.h>
#include <algorithm>
#include "base/CCDirector.h"
#include "base/ccUTF8.h"
#include "platform/CCFileUtils.h"

Просмотреть файл

@ -27,7 +27,6 @@
#define _FontFreetype_h_
#include "CCFont.h"
#include "base/CCData.h"
#include <string>
#include <ft2build.h>

Просмотреть файл

@ -26,7 +26,6 @@ THE SOFTWARE.
#ifndef __EFFECTS_CCGRABBER_H__
#define __EFFECTS_CCGRABBER_H__
#include "base/CCConfiguration.h"
#include "base/CCRef.h"
#include "CCGL.h"

Просмотреть файл

@ -23,18 +23,18 @@ 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 "2d/CCGrid.h"
#include "base/ccMacros.h"
#include "base/CCDirector.h"
#include "2d/CCGrabber.h"
#include "base/ccUtils.h"
#include "2d/CCGrid.h"
#include "2d/CCNode.h"
#include "2d/CCGrabber.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCGLProgramCache.h"
#include "renderer/ccGLStateCache.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCTexture2D.h"
#include "CCGL.h"
#include "math/TransformUtils.h"
NS_CC_BEGIN
// implementation of GridBase
@ -321,21 +321,7 @@ void Grid3D::blit(void)
//
// Attributes
//
#ifdef EMSCRIPTEN
// Size calculations from calculateVertexPoints().
unsigned int numOfPoints = (_gridSize.width+1) * (_gridSize.height+1);
// position
setGLBufferData(_vertices, numOfPoints * sizeof(Vec3), 0);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, 0);
// texCoords
setGLBufferData(_texCoordinates, numOfPoints * sizeof(Vec2), 1);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, 0);
setGLIndexData(_indices, n * 12, 0);
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, 0);
#else
// position
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _vertices);
@ -343,8 +329,6 @@ void Grid3D::blit(void)
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoordinates);
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, _indices);
#endif // EMSCRIPTEN
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,n*6);
}
void Grid3D::calculateVertexPoints(void)
@ -537,20 +521,7 @@ void TiledGrid3D::blit(void)
// Attributes
//
GL::enableVertexAttribs( GL::VERTEX_ATTRIB_FLAG_POSITION | GL::VERTEX_ATTRIB_FLAG_TEX_COORD );
#ifdef EMSCRIPTEN
int numQuads = _gridSize.width * _gridSize.height;
// position
setGLBufferData(_vertices, (numQuads*4*sizeof(Vec3)), 0);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, 0);
// texCoords
setGLBufferData(_texCoordinates, (numQuads*4*sizeof(Vec2)), 1);
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, 0);
setGLIndexData(_indices, n * 12, 0);
glDrawElements(GL_TRIANGLES, (GLsizei) n*6, GL_UNSIGNED_SHORT, 0);
#else
// position
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_POSITION, 3, GL_FLOAT, GL_FALSE, 0, _vertices);
@ -558,8 +529,6 @@ void TiledGrid3D::blit(void)
glVertexAttribPointer(GLProgram::VERTEX_ATTRIB_TEX_COORD, 2, GL_FLOAT, GL_FALSE, 0, _texCoordinates);
glDrawElements(GL_TRIANGLES, (GLsizei)n*6, GL_UNSIGNED_SHORT, _indices);
#endif // EMSCRIPTEN
CC_INCREMENT_GL_DRAWN_BATCHES_AND_VERTICES(1,n*6);
}

Просмотреть файл

@ -29,17 +29,13 @@ THE SOFTWARE.
#include "base/CCRef.h"
#include "base/ccTypes.h"
#include "base/CCDirector.h"
#include "2d/CCNode.h"
#include "renderer/CCTexture2D.h"
#ifdef EMSCRIPTEN
#include "CCGLBufferedNode.h"
#endif // EMSCRIPTEN
NS_CC_BEGIN
class Texture2D;
class Grabber;
class GLProgram;
class Node;
/**
* @addtogroup effects
@ -108,9 +104,6 @@ protected:
Grid3D is a 3D grid implementation. Each vertex has 3 dimensions: x,y,z
*/
class CC_DLL Grid3D : public GridBase
#ifdef EMSCRIPTEN
, public GLBufferedNode
#endif // EMSCRIPTEN
{
public:
/** create one Grid */
@ -171,9 +164,6 @@ protected:
the tiles can be separated from the grid.
*/
class CC_DLL TiledGrid3D : public GridBase
#ifdef EMSCRIPTEN
, public GLBufferedNode
#endif // EMSCRIPTEN
{
public:
/** create one Grid */

Просмотреть файл

@ -28,18 +28,14 @@
#include "2d/CCSprite.h"
#include "2d/CCLabelTextFormatter.h"
#include "base/ccUTF8.h"
#include "2d/CCSpriteFrame.h"
#include "platform/CCFileUtils.h"
#include "2d/CCFont.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCRenderer.h"
#include "renderer/ccGLStateCache.h"
#include "base/CCDirector.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"
#include "base/CCEventType.h"
#include "base/CCEventCustom.h"
#include "base/CCProfiling.h"
#include "deprecated/CCString.h"

Просмотреть файл

@ -28,7 +28,6 @@
#define _COCOS2D_CCLABEL_H_
#include "2d/CCSpriteBatchNode.h"
#include "base/ccTypes.h"
#include "renderer/CCCustomCommand.h"
#include "2d/CCFontAtlas.h"

Просмотреть файл

@ -24,17 +24,11 @@ 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 "CCLabelAtlas.h"
#include "2d/CCLabelAtlas.h"
#include "renderer/CCTextureAtlas.h"
#include "2d/CCDrawingPrimitives.h"
#include "platform/CCFileUtils.h"
#include "base/ccConfig.h"
#include "base/CCDirector.h"
#include "renderer/CCTextureCache.h"
#include "renderer/CCGLProgramCache.h"
#include "renderer/CCGLProgram.h"
#include "renderer/ccGLStateCache.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h"

Просмотреть файл

@ -31,8 +31,7 @@ http://slick.cokeandcode.com/demos/hiero.jnlp (Free, Java)
http://www.angelcode.com/products/bmfont/ (Free, Windows only)
****************************************************************************/
#include "CCLabelBMFont.h"
#include "2d/CCDrawingPrimitives.h"
#include "2d/CCLabelBMFont.h"
#include "deprecated/CCString.h"
#include "2d/CCSprite.h"

Просмотреть файл

@ -23,7 +23,7 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
THE SOFTWARE.
****************************************************************************/
#include "CCLabelTTF.h"
#include "2d/CCLabelTTF.h"
#include "2d/CCLabel.h"
#include "deprecated/CCString.h"

Просмотреть файл

@ -29,10 +29,6 @@ THE SOFTWARE.
#include "2d/CCLayer.h"
#include "base/CCScriptSupport.h"
#include "platform/CCDevice.h"
#include "2d/CCScene.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/CCGLProgram.h"
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h"
#include "renderer/ccGLStateCache.h"
#include "base/CCDirector.h"
@ -43,7 +39,7 @@ THE SOFTWARE.
#include "base/CCEventListenerKeyboard.h"
#include "base/CCEventAcceleration.h"
#include "base/CCEventListenerAcceleration.h"
#include "math/TransformUtils.h"
#include "deprecated/CCString.h"

Просмотреть файл

@ -30,15 +30,8 @@ THE SOFTWARE.
#include "2d/CCNode.h"
#include "base/CCProtocols.h"
#include "base/CCEventTouch.h"
#ifdef EMSCRIPTEN
#include "CCGLBufferedNode.h"
#endif // EMSCRIPTEN
#include "base/CCEventKeyboard.h"
#include "renderer/CCCustomCommand.h"
#include "physics/CCPhysicsWorld.h"
NS_CC_BEGIN
@ -54,6 +47,8 @@ class EventListenerTouch;
class EventListenerKeyboard;
class EventListenerAcceleration;
class Touch;
//
// Layer
//
@ -246,9 +241,6 @@ All features from Layer are valid, plus the following new features:
- RGB colors
*/
class CC_DLL LayerColor : public Layer, public BlendProtocol
#ifdef EMSCRIPTEN
, public GLBufferedNode
#endif // EMSCRIPTEN
{
public:
/** creates a fullscreen black layer */

Просмотреть файл

@ -28,11 +28,10 @@ THE SOFTWARE.
#include "2d/CCMenuItem.h"
#include "2d/CCLayer.h"
#include "base/CCVector.h"
#include "base/CCEventTouch.h"
#include "base/CCValue.h"
NS_CC_BEGIN
class Touch;
/**
* @addtogroup GUI

Просмотреть файл

@ -49,6 +49,7 @@ THE SOFTWARE.
#if CC_USE_PHYSICS
#include "physics/CCPhysicsBody.h"
#include "physics/CCPhysicsWorld.h"
#endif

Просмотреть файл

@ -30,12 +30,12 @@ THE SOFTWARE.
#include "base/CCCamera.h"
#include "base/CCEventDispatcher.h"
#include "base/CCEventListenerCustom.h"
#include "2d/CCLayer.h"
#include "2d/CCSprite.h"
#include "2d/CCSpriteBatchNode.h"
#include "physics/CCPhysicsWorld.h"
#include "deprecated/CCString.h"
#if CC_USE_PHYSICS
#include "physics/CCPhysicsWorld.h"
#endif
NS_CC_BEGIN
Scene::Scene()
@ -116,6 +116,14 @@ Scene* Scene::getScene() const
return const_cast<Scene*>(this);
}
void Scene::onProjectionChanged(EventCustom* event)
{
if (_defaultCamera)
{
_defaultCamera->initDefault();
}
}
#if CC_USE_PHYSICS
void Scene::addChild(Node* child, int zOrder, int tag)
{
@ -193,14 +201,6 @@ void Scene::addChildToPhysicsWorld(Node* child)
}
}
void Scene::onProjectionChanged(EventCustom* event)
{
if (_defaultCamera)
{
_defaultCamera->initDefault();
}
}
#endif
NS_CC_END

Просмотреть файл

@ -30,13 +30,15 @@ THE SOFTWARE.
#include <string>
#include "2d/CCNode.h"
#include "physics/CCPhysicsWorld.h"
NS_CC_BEGIN
class Camera;
class EventListenerCustom;
class EventCustom;
#if CC_USE_PHYSICS
class PhysicsWorld;
#endif
/**
* @addtogroup scene
* @{

Просмотреть файл

@ -29,7 +29,6 @@ THE SOFTWARE.
#define __CCTRANSITION_H__
#include "2d/CCScene.h"
#include "base/ccTypes.h"
NS_CC_BEGIN

Просмотреть файл

@ -26,9 +26,6 @@ THE SOFTWARE.
#include "2d/CCTransitionPageTurn.h"
#include "base/CCDirector.h"
#include "2d/CCActionInterval.h"
#include "2d/CCActionInstant.h"
#include "2d/CCActionGrid.h"
#include "2d/CCActionPageTurn3D.h"
#include "2d/CCNodeGrid.h"
#include "renderer/CCRenderer.h"

Просмотреть файл

@ -30,7 +30,6 @@ THE SOFTWARE.
#include "base/CCDirector.h"
#include "2d/CCRenderTexture.h"
#include "2d/CCProgressTimer.h"
#include "2d/CCLayer.h"
#include "2d/CCActionInstant.h"
#include "2d/CCActionProgressTimer.h"

Просмотреть файл

@ -29,6 +29,7 @@
#include "renderer/CCCustomCommand.h"
#include "renderer/CCRenderer.h"
#include "renderer/CCGLProgramState.h"
#include "renderer/ccGLStateCache.h"
#include "base/CCDirector.h"
#include "base/CCEventListenerCustom.h"
#include "base/CCEventDispatcher.h"