From f894e00f27ac29a282588df4724ee94e96994bb0 Mon Sep 17 00:00:00 2001 From: minggo Date: Wed, 6 Jul 2011 16:29:56 +0800 Subject: [PATCH] fix a bug of CCProgressTimer when upgrade to rc3 --- cocos2dx/misc_nodes/CCProgressTimer.cpp | 4 ++-- cocos2dx/textures/CCTextureAtlas.cpp | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/cocos2dx/misc_nodes/CCProgressTimer.cpp b/cocos2dx/misc_nodes/CCProgressTimer.cpp index acd7fb114b..498d6874de 100644 --- a/cocos2dx/misc_nodes/CCProgressTimer.cpp +++ b/cocos2dx/misc_nodes/CCProgressTimer.cpp @@ -96,7 +96,7 @@ void CCProgressTimer::setPercentage(float fPercentage) { if (m_fPercentage != fPercentage) { - m_fPercentage = clampf(m_fPercentage, 0, 100); + m_fPercentage = clampf(fPercentage, 0, 100); updateProgress(); } } @@ -164,7 +164,7 @@ ccVertex2F CCProgressTimer::vertexFromTexCoord(cocos2d::CCPoint texCoord) void CCProgressTimer::updateColor(void) { - GLbyte op = m_pSprite->getOpacity(); + GLubyte op = m_pSprite->getOpacity(); ccColor3B c3b = m_pSprite->getColor(); ccColor4B color = {c3b.r, c3b.g, c3b.b, op}; diff --git a/cocos2dx/textures/CCTextureAtlas.cpp b/cocos2dx/textures/CCTextureAtlas.cpp index d5534357b5..5b096b9c6d 100644 --- a/cocos2dx/textures/CCTextureAtlas.cpp +++ b/cocos2dx/textures/CCTextureAtlas.cpp @@ -44,6 +44,9 @@ CCTextureAtlas::CCTextureAtlas() :m_pIndices(NULL) ,m_pTexture(NULL) ,m_pQuads(NULL) +#if CC_USES_VBO + , m_bDirty(false) +#endif {} CCTextureAtlas::~CCTextureAtlas()