fix a bug that cause error when loading libtest.so on android

This commit is contained in:
minggo 2011-08-09 13:56:09 +08:00
parent bde465e902
commit 08797014e9
1 changed files with 3 additions and 1 deletions

View File

@ -322,7 +322,9 @@ void RenderTextureSave::ccTouchesMoved(CCSet* touches, CCEvent* event)
m_pBrush->setRotation(rand() % 360); m_pBrush->setRotation(rand() % 360);
float r = (float)(rand() % 50 / 50.f) + 0.25f; float r = (float)(rand() % 50 / 50.f) + 0.25f;
m_pBrush->setScale(r); m_pBrush->setScale(r);
m_pBrush->setColor(ccc3(CCRANDOM_0_1() * 127 + 128, 255, 255)); /*m_pBrush->setColor(ccc3(CCRANDOM_0_1() * 127 + 128, 255, 255));*/
// Use CCRANDOM_0_1() will cause error when loading libtests.so on android, I don't know why.
m_pBrush->setColor(ccc3(rand() % 127 + 128, 255, 255));
// Call visit to draw the brush, don't call draw.. // Call visit to draw the brush, don't call draw..
m_pBrush->visit(); m_pBrush->visit();
} }