issue #2171: Fixing compilation errors for Linux port.

This commit is contained in:
James Chen 2013-12-17 14:50:40 +08:00
parent d74ebe18a9
commit 2a38d4fe94
7 changed files with 35 additions and 10 deletions

View File

@ -143,6 +143,7 @@ include_directories(
${CMAKE_CURRENT_SOURCE_DIR}/cocos
${CMAKE_CURRENT_SOURCE_DIR}/cocos/audio/include
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/renderer
${CMAKE_CURRENT_SOURCE_DIR}/cocos/2d/platform
${CMAKE_CURRENT_SOURCE_DIR}/cocos/base
${CMAKE_CURRENT_SOURCE_DIR}/cocos/physics

View File

@ -1236,11 +1236,12 @@ const kmMat4& Node::getNodeToParentTransform() const
// Build Transform Matrix
// Adjusted transform calculation for rotational skew
_transform = { cy * _scaleX, sy * _scaleX, 0, 0,
kmScalar mat[] = { cy * _scaleX, sy * _scaleX, 0, 0,
-sx * _scaleY, cx * _scaleY, 0, 0,
0, 0, 1, 0,
x, y, 0, 1 };
kmMat4Fill(&_transform, mat);
// XXX: Try to inline skew
// If skew is needed, apply skew and then anchor point
if (needsSkewMatrix)

View File

@ -138,6 +138,22 @@ set(COCOS2D_SRC
platform/CCThread.cpp
platform/CCEGLViewProtocol.cpp
platform/CCFileUtils.cpp
renderer/CCNewDrawNode.cpp
renderer/CCNewLabelAtlas.cpp
renderer/CCNewParticleSystemQuad.cpp
renderer/CCNewRenderTexture.cpp
renderer/CCNewSprite.cpp
renderer/CCNewSpriteBatchNode.cpp
renderer/CCNewTextureAtlas.cpp
renderer/CustomCommand.cpp
renderer/Frustum.cpp
renderer/GroupCommand.cpp
renderer/MaterialManager.cpp
renderer/NewClippingNode.cpp
renderer/QuadCommand.cpp
renderer/RenderCommand.cpp
renderer/Renderer.cpp
renderer/RenderMaterial.cpp
)
include(../physics/CMakeLists.txt)

View File

@ -388,11 +388,13 @@ const kmMat4& Armature::getNodeToParentTransform() const
// Build Transform Matrix
// Adjusted transform calculation for rotational skew
_transform = { cy * _scaleX, sy * _scaleX, 0, 0,
-sx * _scaleY, cx * _scaleY, 0, 0,
0, 0, 1, 0,
x, y, 0, 1 };
kmScalar mat[] = { cy * _scaleX, sy * _scaleX, 0, 0,
-sx * _scaleY, cx * _scaleY, 0, 0,
0, 0, 1, 0,
x, y, 0, 1 };
kmMat4Fill(&_transform, mat);
// XXX: Try to inline skew
// If skew is needed, apply skew and then anchor point
if (needsSkewMatrix)

View File

@ -42,7 +42,6 @@ Control::Control()
, _selected(false)
, _highlighted(false)
, _hasVisibleParents(false)
, _dispatchTable(NULL)
, _isOpacityModifyRGB(false)
, _state(State::NORMAL)
{

View File

@ -360,10 +360,15 @@ const kmMat4& PhysicsSprite::getNodeToParentTransform() const
y += _anchorPointInPoints.y;
}
_transform = { (kmScalar)rot.x * _scaleX, (kmScalar)rot.y * _scaleX, 0, 0,
(kmScalar)-rot.y * _scaleY, (kmScalar)rot.x * _scaleY, 0, 0,
0, 0, 1, 0,
x, y, 0, 1};
kmScalar mat[] = { (kmScalar)rot.x * _scaleX, (kmScalar)rot.y * _scaleX, 0, 0,
(kmScalar)-rot.y * _scaleY, (kmScalar)rot.x * _scaleY, 0, 0,
0, 0, 1, 0,
x, y, 0, 1};
kmMat4Fill(&_transform, mat);
return _transform;

View File

@ -80,6 +80,7 @@ set(SAMPLE_SRC
Classes/ExtensionsTest/CocoStudioGUITest/UITextFieldTest/UITextFieldTest.cpp
Classes/ExtensionsTest/CocoStudioGUITest/CocosGUIScene.cpp
Classes/ExtensionsTest/Scale9SpriteTest/Scale9SpriteTest.cpp
Classes/NewRendererTest/NewRendererTest.cpp
Classes/NewEventDispatcherTest/NewEventDispatcherTest.cpp
Classes/FontTest/FontTest.cpp
Classes/IntervalTest/IntervalTest.cpp