mirror of https://github.com/axmolengine/axmol.git
Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20
This commit is contained in:
commit
087341b316
|
@ -21,10 +21,17 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "samples\T
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "extensions\proj.win32\libExtensions.vcxproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\proj.win32\TestLua.win32.vcxproj", "{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}"
|
||||
ProjectSection(ProjectDependencies) = postProject
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28} = {21B2C324-891F-48EA-AD1A-5AE13DE12E28}
|
||||
{DDC3E27F-004D-4DD4-9DD3-931A013D2159} = {DDC3E27F-004D-4DD4-9DD3-931A013D2159}
|
||||
{98A51BA8-FC3A-415B-AC8F-8C7BD464E93E} = {98A51BA8-FC3A-415B-AC8F-8C7BD464E93E}
|
||||
{207BC7A9-CCF1-4F2F-A04D-45F72242AE25} = {207BC7A9-CCF1-4F2F-A04D-45F72242AE25}
|
||||
{929480E7-23C0-4DF6-8456-096D71547116} = {929480E7-23C0-4DF6-8456-096D71547116}
|
||||
{F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6} = {F8EDD7FA-9A51-4E80-BAEB-860825D2EAC6}
|
||||
EndProjectSection
|
||||
EndProject
|
||||
Global
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionConfigurationPlatforms) = preSolution
|
||||
Debug|Win32 = Debug|Win32
|
||||
Release|Win32 = Release|Win32
|
||||
|
@ -70,8 +77,15 @@ Global
|
|||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{21B2C324-891F-48EA-AD1A-5AE13DE12E28}.Release|Win32.Build.0 = Release|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{4E6A7A0E-DDD8-4BAA-8B22-C964069364ED}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
EndGlobalSection
|
||||
GlobalSection(DPCodeReviewSolutionGUID) = preSolution
|
||||
DPCodeReviewSolutionGUID = {00000000-0000-0000-0000-000000000000}
|
||||
EndGlobalSection
|
||||
EndGlobal
|
||||
|
|
|
@ -82,6 +82,7 @@ platform/android/CCApplication.cpp \
|
|||
platform/android/CCCommon.cpp \
|
||||
platform/android/CCFileUtils.cpp \
|
||||
platform/android/CCImage.cpp \
|
||||
platform/android/jni/EditBoxJni.cpp \
|
||||
platform/android/jni/JniHelper.cpp \
|
||||
platform/android/jni/IMEJni.cpp \
|
||||
platform/android/jni/MessageJni.cpp \
|
||||
|
|
|
@ -733,7 +733,7 @@ void CCDirector::showStats(void)
|
|||
sprintf(m_pszFPS, "%.1f", m_fFrameRate);
|
||||
m_pFPSLabel->setString(m_pszFPS);
|
||||
|
||||
sprintf(m_pszFPS, "%4d", g_uNumberOfDraws);
|
||||
sprintf(m_pszFPS, "%4lu", (unsigned long)g_uNumberOfDraws);
|
||||
m_pDrawsLabel->setString(m_pszFPS);
|
||||
}
|
||||
|
||||
|
|
|
@ -76,7 +76,7 @@ CCObject* CCAction::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pRet = new CCAction();
|
||||
pZone = pNewZone = new CCZone(pRet);
|
||||
pNewZone = new CCZone(pRet);
|
||||
}
|
||||
//copy member data
|
||||
pRet->m_nTag = m_nTag;
|
||||
|
|
|
@ -179,7 +179,7 @@ CCObject* CCEaseRateAction::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseRateAction();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -235,7 +235,7 @@ CCObject* CCEaseIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -292,7 +292,7 @@ CCObject* CCEaseOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -349,7 +349,7 @@ CCObject* CCEaseInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval*)(m_pOther->copy()->autorelease()), m_fRate);
|
||||
|
@ -415,7 +415,7 @@ CCObject* CCEaseExponentialIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseExponentialIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -472,7 +472,7 @@ CCObject* CCEaseExponentialOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseExponentialOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -529,7 +529,7 @@ CCObject* CCEaseExponentialInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseExponentialInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -596,7 +596,7 @@ CCObject* CCEaseSineIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseSineIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -653,7 +653,7 @@ CCObject* CCEaseSineOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseSineOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -710,7 +710,7 @@ CCObject* CCEaseSineInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseSineInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -779,7 +779,7 @@ CCObject* CCEaseElastic::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElastic();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -833,7 +833,7 @@ CCObject* CCEaseElasticIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElasticIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -903,7 +903,7 @@ CCObject *CCEaseElasticOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElasticOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -972,7 +972,7 @@ CCObject* CCEaseElasticInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseElasticInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()), m_fPeriod);
|
||||
|
@ -1056,7 +1056,7 @@ CCObject* CCEaseBounce::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounce();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1129,7 +1129,7 @@ CCObject* CCEaseBounceIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounceIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1187,7 +1187,7 @@ CCObject* CCEaseBounceOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounceOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1245,7 +1245,7 @@ CCObject* CCEaseBounceInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBounceInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1313,7 +1313,7 @@ CCObject* CCEaseBackIn::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBackIn();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1371,7 +1371,7 @@ CCObject* CCEaseBackOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBackOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
@ -1431,7 +1431,7 @@ CCObject* CCEaseBackInOut::copyWithZone(CCZone *pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCEaseBackInOut();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAction((CCActionInterval *)(m_pOther->copy()->autorelease()));
|
||||
|
|
|
@ -27,6 +27,7 @@
|
|||
#include "CCActionInstant.h"
|
||||
#include "base_nodes/CCNode.h"
|
||||
#include "sprite_nodes/CCSprite.h"
|
||||
#include "script_support/CCScriptSupport.h"
|
||||
#include "cocoa/CCZone.h"
|
||||
|
||||
NS_CC_BEGIN
|
||||
|
@ -376,6 +377,20 @@ CCCallFunc * CCCallFunc::create(CCObject* pSelectorTarget, SEL_CallFunc selector
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCCallFunc * CCCallFunc::create(int nHandler)
|
||||
{
|
||||
CCCallFunc *pRet = new CCCallFunc();
|
||||
|
||||
if (pRet) {
|
||||
pRet->m_nScriptHandler = nHandler;
|
||||
pRet->autorelease();
|
||||
}
|
||||
else{
|
||||
CC_SAFE_DELETE(pRet);
|
||||
}
|
||||
return pRet;
|
||||
}
|
||||
|
||||
bool CCCallFunc::initWithTarget(CCObject* pSelectorTarget) {
|
||||
if (pSelectorTarget)
|
||||
{
|
||||
|
@ -419,6 +434,9 @@ void CCCallFunc::execute() {
|
|||
if (m_pCallFunc) {
|
||||
(m_pSelectorTarget->*m_pCallFunc)();
|
||||
}
|
||||
if (m_nScriptHandler) {
|
||||
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionByHandler(m_nScriptHandler);
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
|
@ -428,6 +446,9 @@ void CCCallFuncN::execute() {
|
|||
if (m_pCallFuncN) {
|
||||
(m_pSelectorTarget->*m_pCallFuncN)(m_pTarget);
|
||||
}
|
||||
if (m_nScriptHandler) {
|
||||
CCScriptEngineManager::sharedManager()->getScriptEngine()->executeFunctionWithCCObject(m_nScriptHandler, m_pTarget, "CCNode");
|
||||
}
|
||||
}
|
||||
|
||||
CCCallFuncN * CCCallFuncN::actionWithTarget(CCObject* pSelectorTarget, SEL_CallFuncN selector)
|
||||
|
@ -449,6 +470,20 @@ CCCallFuncN * CCCallFuncN::create(CCObject* pSelectorTarget, SEL_CallFuncN selec
|
|||
return NULL;
|
||||
}
|
||||
|
||||
CCCallFuncN * CCCallFuncN::create(int nHandler)
|
||||
{
|
||||
CCCallFuncN *pRet = new CCCallFuncN();
|
||||
|
||||
if (pRet) {
|
||||
pRet->m_nScriptHandler = nHandler;
|
||||
pRet->autorelease();
|
||||
}
|
||||
else{
|
||||
CC_SAFE_DELETE(pRet);
|
||||
}
|
||||
return pRet;
|
||||
}
|
||||
|
||||
bool CCCallFuncN::initWithTarget(CCObject* pSelectorTarget,
|
||||
SEL_CallFuncN selector) {
|
||||
if (CCCallFunc::initWithTarget(pSelectorTarget)) {
|
||||
|
|
|
@ -215,6 +215,7 @@ public:
|
|||
CCCallFunc()
|
||||
: m_pSelectorTarget(NULL)
|
||||
, m_pCallFunc(NULL)
|
||||
, m_nScriptHandler(0)
|
||||
{
|
||||
}
|
||||
virtual ~CCCallFunc()
|
||||
|
@ -233,7 +234,10 @@ public:
|
|||
*/
|
||||
static CCCallFunc * create(CCObject* pSelectorTarget, SEL_CallFunc selector);
|
||||
|
||||
/** initializes the action with the callback
|
||||
/** creates the action with the handler script function */
|
||||
static CCCallFunc * create(int nHandler);
|
||||
|
||||
/** initializes the action with the callback
|
||||
|
||||
typedef void (CCObject::*SEL_CallFunc)();
|
||||
*/
|
||||
|
@ -263,6 +267,8 @@ protected:
|
|||
/** Target that will be called */
|
||||
CCObject* m_pSelectorTarget;
|
||||
|
||||
int m_nScriptHandler;
|
||||
|
||||
union
|
||||
{
|
||||
SEL_CallFunc m_pCallFunc;
|
||||
|
@ -292,6 +298,10 @@ public:
|
|||
typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
|
||||
*/
|
||||
static CCCallFuncN * create(CCObject* pSelectorTarget, SEL_CallFuncN selector);
|
||||
|
||||
/** creates the action with the handler script function */
|
||||
static CCCallFuncN * create(int nHandler);
|
||||
|
||||
/** initializes the action with the callback
|
||||
|
||||
typedef void (CCObject::*SEL_CallFuncN)(CCNode*);
|
||||
|
|
|
@ -335,6 +335,12 @@ void CCSequence::update(float t)
|
|||
}
|
||||
}
|
||||
|
||||
// Last action found and it is done.
|
||||
if( found == m_last && m_pActions[found]->isDone() )
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
// New action. Start it.
|
||||
if( found != m_last )
|
||||
{
|
||||
|
|
|
@ -30,7 +30,7 @@ NS_CC_BEGIN
|
|||
|
||||
const char* cocos2dVersion()
|
||||
{
|
||||
return "cocos2d-2.0-x-2.0.1";
|
||||
return "cocos2d-2.0-x-2.0.2";
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -119,8 +119,9 @@ void calculate_line_normal(kmVec2 p1, kmVec2 p2, kmVec2* normal_out) {
|
|||
|
||||
kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2* p2, const kmVec2* p3, kmVec2* intersection, kmVec2* normal_out) {
|
||||
kmVec2 intersect;
|
||||
kmVec2 final_intersect;
|
||||
kmVec2 normal;
|
||||
kmVec2 final_intersect;
|
||||
kmVec2 normal;
|
||||
//kmVec2 final_intersect = {.x = 0, .y = 0}, normal = {.x = 0, .y = 0}; // Silencing LLVM SA
|
||||
kmScalar distance = 10000.0f;
|
||||
kmBool intersected = KM_FALSE;
|
||||
|
||||
|
@ -163,7 +164,7 @@ kmBool kmRay2IntersectTriangle(const kmRay2* ray, const kmVec2* p1, const kmVec2
|
|||
if(this_distance < distance) {
|
||||
final_intersect.x = intersect.x;
|
||||
final_intersect.y = intersect.y;
|
||||
distance = this_distance;
|
||||
//distance = this_distance;
|
||||
|
||||
calculate_line_normal(*p3, *p1, &normal);
|
||||
}
|
||||
|
|
|
@ -251,7 +251,7 @@ static void cc_utf8_trim_ws(std::vector<unsigned short>* str)
|
|||
*
|
||||
* Return value: the length of the string in characters
|
||||
**/
|
||||
static long
|
||||
long
|
||||
cc_utf8_strlen (const char * p, int max)
|
||||
{
|
||||
long len = 0;
|
||||
|
@ -842,7 +842,7 @@ void CCLabelBMFont::createFontChars()
|
|||
{
|
||||
int nextFontPositionX = 0;
|
||||
int nextFontPositionY = 0;
|
||||
unsigned short prev = -1;
|
||||
//unsigned short prev = -1;
|
||||
int kerningAmount = 0;
|
||||
|
||||
CCSize tmpSize = CCSizeZero;
|
||||
|
@ -924,7 +924,7 @@ void CCLabelBMFont::createFontChars()
|
|||
|
||||
// update kerning
|
||||
nextFontPositionX += fontDef.xAdvance + kerningAmount;
|
||||
prev = c;
|
||||
//prev = c;
|
||||
|
||||
// Apply label properties
|
||||
fontChar->setOpacityModifyRGB(m_bIsOpacityModifyRGB);
|
||||
|
|
|
@ -194,11 +194,13 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma
|
|||
m_ePixelFormat = eFormat;
|
||||
|
||||
m_pTexture = new CCTexture2D();
|
||||
CC_BREAK_IF(! m_pTexture);
|
||||
|
||||
m_pTexture->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h));
|
||||
free( data );
|
||||
|
||||
if (m_pTexture) {
|
||||
m_pTexture->initWithData(data, (CCTexture2DPixelFormat)m_ePixelFormat, powW, powH, CCSizeMake((float)w, (float)h));
|
||||
free( data );
|
||||
} else {
|
||||
free( data ); // ScopeGuard (a simulated Finally clause) would be more elegant.
|
||||
break;
|
||||
}
|
||||
GLint oldRBO;
|
||||
glGetIntegerv(GL_RENDERBUFFER_BINDING, &oldRBO);
|
||||
|
||||
|
@ -214,7 +216,7 @@ bool CCRenderTexture::initWithWidthAndHeight(int w, int h, CCTexture2DPixelForma
|
|||
//create and attach depth buffer
|
||||
glGenRenderbuffers(1, &m_uDepthRenderBufffer);
|
||||
glBindRenderbuffer(GL_RENDERBUFFER, m_uDepthRenderBufffer);
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, uDepthStencilFormat, powW, powH);
|
||||
glRenderbufferStorage(GL_RENDERBUFFER, uDepthStencilFormat, (GLsizei)powW, (GLsizei)powH);
|
||||
glFramebufferRenderbuffer(GL_FRAMEBUFFER, GL_DEPTH_ATTACHMENT, GL_RENDERBUFFER, m_uDepthRenderBufffer);
|
||||
|
||||
// if depth format is the one with stencil part, bind same render buffer as stencil attachment
|
||||
|
|
|
@ -27,6 +27,7 @@ THE SOFTWARE.
|
|||
#include "ccMacros.h"
|
||||
#include "touch_dispatcher/CCTouchDispatcher.h"
|
||||
#include "jni/IMEJni.h"
|
||||
#include "jni/EditBoxJni.h"
|
||||
#include "jni/MessageJni.h"
|
||||
#include "CCGL.h"
|
||||
|
||||
|
@ -84,7 +85,6 @@ CCEGLView* CCEGLView::sharedOpenGLView()
|
|||
|
||||
void CCEGLView::setIMEKeyboardState(bool bOpen)
|
||||
{
|
||||
|
||||
setKeyboardStateJNI((int)bOpen);
|
||||
}
|
||||
|
||||
|
|
|
@ -28,6 +28,7 @@ import android.app.Activity;
|
|||
import android.app.AlertDialog;
|
||||
import android.app.Dialog;
|
||||
import android.content.DialogInterface;
|
||||
import android.content.Intent;
|
||||
import android.content.pm.ApplicationInfo;
|
||||
import android.content.pm.PackageManager;
|
||||
import android.content.pm.PackageManager.NameNotFoundException;
|
||||
|
@ -40,6 +41,8 @@ import android.util.DisplayMetrics;
|
|||
import android.util.Log;
|
||||
|
||||
public class Cocos2dxActivity extends Activity{
|
||||
|
||||
protected Cocos2dxGLSurfaceView mGLView;
|
||||
private static Cocos2dxMusic backgroundMusicPlayer;
|
||||
private static Cocos2dxSound soundPlayer;
|
||||
private static Cocos2dxAccelerometer accelerometer;
|
||||
|
@ -47,11 +50,18 @@ public class Cocos2dxActivity extends Activity{
|
|||
private static boolean accelerometerEnabled = false;
|
||||
private static Handler handler;
|
||||
private final static int HANDLER_SHOW_DIALOG = 1;
|
||||
private final static int HANDLER_SHOW_EDITBOX_DIALOG = 2;
|
||||
|
||||
private static String packageName;
|
||||
|
||||
|
||||
private static native void nativeSetPaths(String apkPath);
|
||||
private static native void nativeSetEditboxText(byte[] text);
|
||||
|
||||
public Cocos2dxGLSurfaceView getGLView() {
|
||||
return mGLView;
|
||||
}
|
||||
|
||||
@Override
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
@ -76,6 +86,9 @@ public class Cocos2dxActivity extends Activity{
|
|||
case HANDLER_SHOW_DIALOG:
|
||||
showDialog(((DialogMessage)msg.obj).title, ((DialogMessage)msg.obj).message);
|
||||
break;
|
||||
case HANDLER_SHOW_EDITBOX_DIALOG:
|
||||
onShowEditBoxDialog((EditBoxMessage)msg.obj);
|
||||
break;
|
||||
}
|
||||
}
|
||||
};
|
||||
|
@ -254,6 +267,42 @@ public class Cocos2dxActivity extends Activity{
|
|||
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
private static void showEditBoxDialog(String title, String content, int inputMode, int inputFlag, int returnType, int maxLength)
|
||||
{
|
||||
Message msg = new Message();
|
||||
msg.what = HANDLER_SHOW_EDITBOX_DIALOG;
|
||||
msg.obj = new EditBoxMessage(title, content, inputMode, inputFlag, returnType, maxLength);
|
||||
handler.sendMessage(msg);
|
||||
}
|
||||
|
||||
private void onShowEditBoxDialog(EditBoxMessage msg)
|
||||
{
|
||||
Dialog dialog = new Cocos2dxEditBoxDialog(this, msg);
|
||||
dialog.show();
|
||||
}
|
||||
|
||||
public void setEditBoxResult(String editResult)
|
||||
{
|
||||
Log.i("editbox_content", editResult);
|
||||
|
||||
try
|
||||
{
|
||||
final byte[] bytesUTF8 = editResult.getBytes("UTF8");
|
||||
// pass utf8 string from editbox activity to native.
|
||||
// Should invoke native method in GL thread.
|
||||
mGLView.queueEvent(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
nativeSetEditboxText(bytesUTF8);
|
||||
}
|
||||
});
|
||||
}
|
||||
catch (java.io.UnsupportedEncodingException e)
|
||||
{
|
||||
e.printStackTrace();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
class DialogMessage {
|
||||
|
@ -265,3 +314,21 @@ class DialogMessage {
|
|||
this.title = title;
|
||||
}
|
||||
}
|
||||
|
||||
class EditBoxMessage {
|
||||
public String title;
|
||||
public String content;
|
||||
public int inputMode;
|
||||
public int inputFlag;
|
||||
public int returnType;
|
||||
public int maxLength;
|
||||
|
||||
public EditBoxMessage(String title, String content, int inputMode, int inputFlag, int returnType, int maxLength){
|
||||
this.content = content;
|
||||
this.title = title;
|
||||
this.inputMode = inputMode;
|
||||
this.inputFlag = inputFlag;
|
||||
this.returnType = returnType;
|
||||
this.maxLength = maxLength;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -32,9 +32,15 @@ import android.graphics.Bitmap;
|
|||
import android.graphics.Canvas;
|
||||
import android.graphics.Color;
|
||||
import android.graphics.Paint;
|
||||
import android.graphics.Rect;
|
||||
import android.graphics.Typeface;
|
||||
import android.graphics.Paint.Align;
|
||||
import android.graphics.Paint.FontMetricsInt;
|
||||
import android.text.Spannable;
|
||||
import android.text.SpannableString;
|
||||
import android.text.TextPaint;
|
||||
import android.text.TextUtils;
|
||||
import android.text.style.StyleSpan;
|
||||
import android.util.Log;
|
||||
|
||||
public class Cocos2dxBitmap{
|
||||
|
@ -410,4 +416,43 @@ public class Cocos2dxBitmap{
|
|||
}
|
||||
|
||||
private static native void nativeInitBitmapDC(int width, int height, byte[] pixels);
|
||||
|
||||
private static int getFontSizeAccordingHeight(int height)
|
||||
{
|
||||
Paint paint = new Paint();
|
||||
Rect bounds = new Rect();
|
||||
|
||||
paint.setTypeface(Typeface.DEFAULT);
|
||||
int incr_text_size = 1;
|
||||
boolean found_desired_size = false;
|
||||
|
||||
while (!found_desired_size) {
|
||||
|
||||
paint.setTextSize(incr_text_size);
|
||||
String text = "SghMNy";
|
||||
paint.getTextBounds(text, 0, text.length(), bounds);
|
||||
|
||||
incr_text_size++;
|
||||
|
||||
if (height - bounds.height() <= 2) {
|
||||
found_desired_size = true;
|
||||
}
|
||||
Log.d("font size", "incr size:" + incr_text_size);
|
||||
}
|
||||
return incr_text_size;
|
||||
}
|
||||
|
||||
private static String getStringWithEllipsis(String originalText, float width, float fontSize){
|
||||
if(TextUtils.isEmpty(originalText)){
|
||||
return "";
|
||||
}
|
||||
|
||||
TextPaint paint = new TextPaint();
|
||||
paint.setTypeface(Typeface.DEFAULT);
|
||||
paint.setTextSize(fontSize);
|
||||
|
||||
return TextUtils.ellipsize(originalText, paint, width,
|
||||
TextUtils.TruncateAt.valueOf("END")).toString();
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -0,0 +1,318 @@
|
|||
package org.cocos2dx.lib;
|
||||
|
||||
import android.app.Dialog;
|
||||
import android.content.Context;
|
||||
import android.graphics.Canvas;
|
||||
import android.graphics.ColorFilter;
|
||||
import android.graphics.drawable.ColorDrawable;
|
||||
import android.graphics.drawable.Drawable;
|
||||
import android.os.Bundle;
|
||||
import android.os.Handler;
|
||||
import android.text.InputFilter;
|
||||
import android.text.InputType;
|
||||
import android.util.Log;
|
||||
import android.util.TypedValue;
|
||||
import android.view.KeyEvent;
|
||||
import android.view.View;
|
||||
import android.view.ViewGroup;
|
||||
import android.view.WindowManager;
|
||||
import android.view.inputmethod.EditorInfo;
|
||||
import android.view.inputmethod.InputMethodManager;
|
||||
import android.widget.EditText;
|
||||
import android.widget.LinearLayout;
|
||||
import android.widget.TextView;
|
||||
import android.widget.TextView.OnEditorActionListener;
|
||||
|
||||
public class Cocos2dxEditBoxDialog extends Dialog {
|
||||
|
||||
/**
|
||||
* The user is allowed to enter any text, including line breaks.
|
||||
*/
|
||||
private final int kEditBoxInputModeAny = 0;
|
||||
|
||||
/**
|
||||
* The user is allowed to enter an e-mail address.
|
||||
*/
|
||||
private final int kEditBoxInputModeEmailAddr = 1;
|
||||
|
||||
/**
|
||||
* The user is allowed to enter an integer value.
|
||||
*/
|
||||
private final int kEditBoxInputModeNumeric = 2;
|
||||
|
||||
/**
|
||||
* The user is allowed to enter a phone number.
|
||||
*/
|
||||
private final int kEditBoxInputModePhoneNumber = 3;
|
||||
|
||||
/**
|
||||
* The user is allowed to enter a URL.
|
||||
*/
|
||||
private final int kEditBoxInputModeUrl = 4;
|
||||
|
||||
/**
|
||||
* The user is allowed to enter a real number value.
|
||||
* This extends kEditBoxInputModeNumeric by allowing a decimal point.
|
||||
*/
|
||||
private final int kEditBoxInputModeDecimal = 5;
|
||||
|
||||
/**
|
||||
* The user is allowed to enter any text, except for line breaks.
|
||||
*/
|
||||
private final int kEditBoxInputModeSingleLine = 6;
|
||||
|
||||
|
||||
/**
|
||||
* Indicates that the text entered is confidential data that should be
|
||||
* obscured whenever possible. This implies EDIT_BOX_INPUT_FLAG_SENSITIVE.
|
||||
*/
|
||||
private final int kEditBoxInputFlagPassword = 0;
|
||||
|
||||
/**
|
||||
* Indicates that the text entered is sensitive data that the
|
||||
* implementation must never store into a dictionary or table for use
|
||||
* in predictive, auto-completing, or other accelerated input schemes.
|
||||
* A credit card number is an example of sensitive data.
|
||||
*/
|
||||
private final int kEditBoxInputFlagSensitive = 1;
|
||||
|
||||
/**
|
||||
* This flag is a hint to the implementation that during text editing,
|
||||
* the initial letter of each word should be capitalized.
|
||||
*/
|
||||
private final int kEditBoxInputFlagInitialCapsWord = 2;
|
||||
|
||||
/**
|
||||
* This flag is a hint to the implementation that during text editing,
|
||||
* the initial letter of each sentence should be capitalized.
|
||||
*/
|
||||
private final int kEditBoxInputFlagInitialCapsSentence = 3;
|
||||
|
||||
/**
|
||||
* Capitalize all characters automatically.
|
||||
*/
|
||||
private final int kEditBoxInputFlagInitialCapsAllCharacters = 4;
|
||||
|
||||
private final int kKeyboardReturnTypeDefault = 0;
|
||||
private final int kKeyboardReturnTypeDone = 1;
|
||||
private final int kKeyboardReturnTypeSend = 2;
|
||||
private final int kKeyboardReturnTypeSearch = 3;
|
||||
private final int kKeyboardReturnTypeGo = 4;
|
||||
|
||||
//
|
||||
private EditText mInputEditText = null;
|
||||
private TextView mTextViewTitle = null;
|
||||
private int mInputMode = 0;
|
||||
private int mInputFlag = 0;
|
||||
private int mReturnType = 0;
|
||||
private int mMaxLength = -1;
|
||||
|
||||
private int mInputFlagConstraints = 0x00000;
|
||||
private int mInputModeContraints = 0x00000;
|
||||
private boolean mIsMultiline = false;
|
||||
private Cocos2dxActivity mParentActivity = null;
|
||||
private EditBoxMessage mMsg = null;
|
||||
|
||||
public Cocos2dxEditBoxDialog(Context context, EditBoxMessage msg) {
|
||||
//super(context, R.style.Theme_Translucent);
|
||||
super(context, android.R.style.Theme_Translucent_NoTitleBar_Fullscreen);
|
||||
// TODO Auto-generated constructor stub
|
||||
mParentActivity = (Cocos2dxActivity)context;
|
||||
mMsg = msg;
|
||||
}
|
||||
|
||||
// Converting dips to pixels
|
||||
private int convertDipsToPixels(float dips)
|
||||
{
|
||||
float scale = getContext().getResources().getDisplayMetrics().density;
|
||||
return Math.round(dips * scale);
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
// TODO Auto-generated method stub
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
getWindow().setBackgroundDrawable(new ColorDrawable(0x80000000));
|
||||
|
||||
LinearLayout layout = new LinearLayout(mParentActivity);
|
||||
layout.setOrientation(LinearLayout.VERTICAL);
|
||||
|
||||
LinearLayout.LayoutParams layoutParams = new LinearLayout.LayoutParams(ViewGroup.
|
||||
LayoutParams.FILL_PARENT,ViewGroup.LayoutParams.FILL_PARENT);
|
||||
|
||||
mTextViewTitle = new TextView(mParentActivity);
|
||||
LinearLayout.LayoutParams textviewParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.WRAP_CONTENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
textviewParams.leftMargin = textviewParams.rightMargin = convertDipsToPixels(10);
|
||||
mTextViewTitle.setTextSize(TypedValue.COMPLEX_UNIT_DIP, 20);
|
||||
layout.addView(mTextViewTitle, textviewParams);
|
||||
|
||||
mInputEditText = new EditText(mParentActivity);
|
||||
LinearLayout.LayoutParams editTextParams = new LinearLayout.LayoutParams(ViewGroup.LayoutParams.FILL_PARENT,
|
||||
ViewGroup.LayoutParams.WRAP_CONTENT);
|
||||
editTextParams.leftMargin = editTextParams.rightMargin = convertDipsToPixels(10);
|
||||
|
||||
layout.addView(mInputEditText, editTextParams);
|
||||
|
||||
setContentView(layout, layoutParams);
|
||||
|
||||
getWindow().addFlags(WindowManager.LayoutParams.FLAG_FULLSCREEN);
|
||||
|
||||
mInputMode = mMsg.inputMode;
|
||||
mInputFlag = mMsg.inputFlag;
|
||||
mReturnType = mMsg.returnType;
|
||||
mMaxLength = mMsg.maxLength;
|
||||
|
||||
mTextViewTitle.setText(mMsg.title);
|
||||
mInputEditText.setText(mMsg.content);
|
||||
|
||||
int oldImeOptions = mInputEditText.getImeOptions();
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_FLAG_NO_EXTRACT_UI);
|
||||
oldImeOptions = mInputEditText.getImeOptions();
|
||||
|
||||
switch (mInputMode)
|
||||
{
|
||||
case kEditBoxInputModeAny:
|
||||
mInputModeContraints =
|
||||
InputType.TYPE_CLASS_TEXT |
|
||||
InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
||||
break;
|
||||
case kEditBoxInputModeEmailAddr:
|
||||
mInputModeContraints =
|
||||
InputType.TYPE_CLASS_TEXT |
|
||||
InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS;
|
||||
break;
|
||||
case kEditBoxInputModeNumeric:
|
||||
mInputModeContraints =
|
||||
InputType.TYPE_CLASS_NUMBER |
|
||||
InputType.TYPE_NUMBER_FLAG_SIGNED;
|
||||
break;
|
||||
case kEditBoxInputModePhoneNumber:
|
||||
mInputModeContraints = InputType.TYPE_CLASS_PHONE;
|
||||
break;
|
||||
case kEditBoxInputModeUrl:
|
||||
mInputModeContraints =
|
||||
InputType.TYPE_CLASS_TEXT |
|
||||
InputType.TYPE_TEXT_VARIATION_URI;
|
||||
break;
|
||||
case kEditBoxInputModeDecimal:
|
||||
mInputModeContraints =
|
||||
InputType.TYPE_CLASS_NUMBER |
|
||||
InputType.TYPE_NUMBER_FLAG_DECIMAL |
|
||||
InputType.TYPE_NUMBER_FLAG_SIGNED;
|
||||
break;
|
||||
case kEditBoxInputModeSingleLine:
|
||||
mInputModeContraints = InputType.TYPE_CLASS_TEXT;
|
||||
break;
|
||||
default:
|
||||
|
||||
break;
|
||||
}
|
||||
|
||||
if ( mIsMultiline ) {
|
||||
mInputModeContraints |= InputType.TYPE_TEXT_FLAG_MULTI_LINE;
|
||||
}
|
||||
|
||||
mInputEditText.setInputType(mInputModeContraints | mInputFlagConstraints);
|
||||
|
||||
switch (mInputFlag)
|
||||
{
|
||||
case kEditBoxInputFlagPassword:
|
||||
mInputFlagConstraints = InputType.TYPE_CLASS_TEXT | InputType.TYPE_TEXT_VARIATION_PASSWORD;
|
||||
break;
|
||||
case kEditBoxInputFlagSensitive:
|
||||
mInputFlagConstraints = InputType.TYPE_TEXT_FLAG_NO_SUGGESTIONS;
|
||||
break;
|
||||
case kEditBoxInputFlagInitialCapsWord:
|
||||
mInputFlagConstraints = InputType.TYPE_TEXT_FLAG_CAP_WORDS;
|
||||
break;
|
||||
case kEditBoxInputFlagInitialCapsSentence:
|
||||
mInputFlagConstraints = InputType.TYPE_TEXT_FLAG_CAP_SENTENCES;
|
||||
break;
|
||||
case kEditBoxInputFlagInitialCapsAllCharacters:
|
||||
mInputFlagConstraints = InputType.TYPE_TEXT_FLAG_CAP_CHARACTERS;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
mInputEditText.setInputType(mInputFlagConstraints | mInputModeContraints);
|
||||
|
||||
switch (mReturnType) {
|
||||
case kKeyboardReturnTypeDefault:
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_ACTION_NONE);
|
||||
break;
|
||||
case kKeyboardReturnTypeDone:
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_ACTION_DONE);
|
||||
break;
|
||||
case kKeyboardReturnTypeSend:
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_ACTION_SEND);
|
||||
break;
|
||||
case kKeyboardReturnTypeSearch:
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_ACTION_SEARCH);
|
||||
break;
|
||||
case kKeyboardReturnTypeGo:
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_ACTION_GO);
|
||||
break;
|
||||
default:
|
||||
mInputEditText.setImeOptions(oldImeOptions | EditorInfo.IME_ACTION_NONE);
|
||||
break;
|
||||
}
|
||||
|
||||
if (mMaxLength > 0) {
|
||||
mInputEditText.setFilters(
|
||||
new InputFilter[] {
|
||||
new InputFilter.LengthFilter(mMaxLength)
|
||||
}
|
||||
);
|
||||
}
|
||||
|
||||
Handler initHandler = new Handler();
|
||||
initHandler.postDelayed(new Runnable() {
|
||||
public void run() {
|
||||
mInputEditText.requestFocus();
|
||||
mInputEditText.setSelection(mInputEditText.length());
|
||||
openKeyboard();
|
||||
}
|
||||
}, 200);
|
||||
|
||||
mInputEditText.setOnEditorActionListener(new OnEditorActionListener() {
|
||||
@Override
|
||||
public boolean onEditorAction(TextView v, int actionId, KeyEvent event) {
|
||||
// if user didn't set keyboard type,
|
||||
// this callback will be invoked twice with 'KeyEvent.ACTION_DOWN' and 'KeyEvent.ACTION_UP'
|
||||
if (actionId != EditorInfo.IME_NULL
|
||||
|| (actionId == EditorInfo.IME_NULL
|
||||
&& event != null
|
||||
&& event.getAction() == KeyEvent.ACTION_DOWN))
|
||||
{
|
||||
//Log.d("EditBox", "actionId: "+actionId +",event: "+event);
|
||||
mParentActivity.setEditBoxResult(mInputEditText.getText().toString());
|
||||
closeKeyboard();
|
||||
dismiss();
|
||||
return true;
|
||||
}
|
||||
return false;
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
private void openKeyboard() {
|
||||
InputMethodManager imm = (InputMethodManager) mParentActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.showSoftInput(mInputEditText, 0);
|
||||
Log.d("Cocos2dxEditBox", "openKeyboard");
|
||||
}
|
||||
|
||||
private void closeKeyboard() {
|
||||
InputMethodManager imm = (InputMethodManager) mParentActivity.getSystemService(Context.INPUT_METHOD_SERVICE);
|
||||
imm.hideSoftInputFromWindow(mInputEditText.getWindowToken(), 0);
|
||||
Log.d("Cocos2dxEditBox", "closeKeyboard");
|
||||
}
|
||||
|
||||
@Override
|
||||
protected void onStop() {
|
||||
// TODO Auto-generated method stub
|
||||
super.onStop();
|
||||
Log.d("EditBox", "onStop...");
|
||||
}
|
||||
}
|
|
@ -0,0 +1,170 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2012 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 "EditBoxJni.h"
|
||||
#include "text_input_node/CCIMEDispatcher.h"
|
||||
#include "JniHelper.h"
|
||||
|
||||
#include <android/log.h>
|
||||
#include <string.h>
|
||||
#include <jni.h>
|
||||
|
||||
#if 0
|
||||
#define LOG_TAG "EditBoxJni"
|
||||
#define LOGD(...) __android_log_print(ANDROID_LOG_DEBUG,LOG_TAG,__VA_ARGS__)
|
||||
#else
|
||||
#define LOGD(...)
|
||||
#endif
|
||||
|
||||
using namespace cocos2d;
|
||||
|
||||
static EditBoxCallback s_pfEditBoxCB = NULL;
|
||||
static void* s_ctx = NULL;
|
||||
|
||||
extern "C"
|
||||
{
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
// handle EditBox message
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
|
||||
|
||||
|
||||
void showEditBoxDialogJni(const char* pszTitle,
|
||||
const char* pszContent,
|
||||
int nInputMode,
|
||||
int nInputFlag,
|
||||
int nReturnType,
|
||||
int nMaxLength,
|
||||
EditBoxCallback pfEditBoxCB,
|
||||
void* ctx)
|
||||
{
|
||||
LOGD("showEditBoxDialogJni...");
|
||||
|
||||
if (pszContent == NULL) {
|
||||
return;
|
||||
}
|
||||
|
||||
s_pfEditBoxCB = pfEditBoxCB;
|
||||
s_ctx = ctx;
|
||||
|
||||
JniMethodInfo t;
|
||||
if (JniHelper::getStaticMethodInfo(t
|
||||
, "org/cocos2dx/lib/Cocos2dxActivity"
|
||||
, "showEditBoxDialog"
|
||||
, "(Ljava/lang/String;Ljava/lang/String;IIII)V"))
|
||||
{
|
||||
jstring stringArg1;
|
||||
|
||||
if (!pszTitle)
|
||||
{
|
||||
stringArg1 = t.env->NewStringUTF("");
|
||||
}
|
||||
else
|
||||
{
|
||||
stringArg1 = t.env->NewStringUTF(pszTitle);
|
||||
}
|
||||
|
||||
jstring stringArg2 = t.env->NewStringUTF(pszContent);
|
||||
|
||||
t.env->CallStaticVoidMethod(t.classID, t.methodID, stringArg1, stringArg2, nInputMode, nInputFlag, nReturnType, nMaxLength);
|
||||
|
||||
t.env->DeleteLocalRef(stringArg1);
|
||||
t.env->DeleteLocalRef(stringArg2);
|
||||
t.env->DeleteLocalRef(t.classID);
|
||||
}
|
||||
}
|
||||
|
||||
void JNICALL Java_org_cocos2dx_lib_Cocos2dxActivity_nativeSetEditboxText(JNIEnv * env, jobject obj, jbyteArray text)
|
||||
{
|
||||
jsize size = env->GetArrayLength(text);
|
||||
|
||||
if (size > 0)
|
||||
{
|
||||
jbyte * data = (jbyte*)env->GetByteArrayElements(text, 0);
|
||||
char* pBuf = (char*)malloc(size+1);
|
||||
if (pBuf != NULL)
|
||||
{
|
||||
memcpy(pBuf, data, size);
|
||||
pBuf[size] = '\0';
|
||||
// pass data to editbox's delegate
|
||||
if (s_pfEditBoxCB) s_pfEditBoxCB(pBuf, s_ctx);
|
||||
free(pBuf);
|
||||
}
|
||||
env->ReleaseByteArrayElements(text, data, 0);
|
||||
}
|
||||
else
|
||||
{
|
||||
if (s_pfEditBoxCB) s_pfEditBoxCB("", s_ctx);
|
||||
}
|
||||
}
|
||||
|
||||
int getFontSizeAccordingHeightJni(int height)
|
||||
{
|
||||
int ret = 0;
|
||||
JniMethodInfo t;
|
||||
if (JniHelper::getStaticMethodInfo(t
|
||||
, "org/cocos2dx/lib/Cocos2dxBitmap"
|
||||
, "getFontSizeAccordingHeight"
|
||||
, "(I)I"))
|
||||
{
|
||||
ret = t.env->CallStaticIntMethod(t.classID, t.methodID, height);
|
||||
t.env->DeleteLocalRef(t.classID);
|
||||
}
|
||||
|
||||
return ret;
|
||||
}
|
||||
|
||||
std::string getStringWithEllipsisJni(const char* pszText, float width, float fontSize)
|
||||
{
|
||||
std::string ret;
|
||||
JniMethodInfo t;
|
||||
|
||||
if (JniHelper::getStaticMethodInfo(t
|
||||
, "org/cocos2dx/lib/Cocos2dxBitmap"
|
||||
, "getStringWithEllipsis"
|
||||
, "(Ljava/lang/String;FF)Ljava/lang/String;"))
|
||||
{
|
||||
jstring stringArg1;
|
||||
|
||||
if (!pszText)
|
||||
{
|
||||
stringArg1 = t.env->NewStringUTF("");
|
||||
}
|
||||
else
|
||||
{
|
||||
stringArg1 = t.env->NewStringUTF(pszText);
|
||||
}
|
||||
|
||||
jstring retFromJava = (jstring)t.env->CallStaticObjectMethod(t.classID, t.methodID, stringArg1, width, fontSize);
|
||||
const char* str = t.env->GetStringUTFChars(retFromJava, 0);
|
||||
ret = str;
|
||||
|
||||
t.env->ReleaseStringUTFChars(retFromJava, str);
|
||||
t.env->DeleteLocalRef(stringArg1);
|
||||
t.env->DeleteLocalRef(t.classID);
|
||||
}
|
||||
LOGD("getStringWithEllipsisJni 07");
|
||||
return ret;
|
||||
}
|
||||
|
||||
} // end of extern "C"
|
|
@ -0,0 +1,47 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2012 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 __EDITBOX_JNI_H__
|
||||
#define __EDITBOX_JNI_H__
|
||||
|
||||
#include <string>
|
||||
|
||||
typedef void (*EditBoxCallback)(const char* pText, void* ctx);
|
||||
|
||||
extern "C"
|
||||
{
|
||||
void showEditBoxDialogJni(const char* pszTitle,
|
||||
const char* pszContent,
|
||||
int nInputMode,
|
||||
int nInputFlag,
|
||||
int nReturnType,
|
||||
int nMaxLength,
|
||||
EditBoxCallback pfEditBoxCB,
|
||||
void* ctx);
|
||||
|
||||
int getFontSizeAccordingHeightJni(int height);
|
||||
std::string getStringWithEllipsisJni(const char* pszText, float width, float fontSize);
|
||||
|
||||
} // end of extern "C"
|
||||
|
||||
#endif // __EDITBOX_JNI_H__
|
|
@ -59,7 +59,7 @@ extern "C"
|
|||
|
||||
void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeOnPause()
|
||||
{
|
||||
CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
|
||||
CCNotificationCenter::sharedNotificationCenter()->postNotification(EVENT_COME_TO_BACKGROUND, NULL);
|
||||
}
|
||||
|
@ -69,7 +69,7 @@ extern "C"
|
|||
// Shared OpenGL View instance doesn't exist yet when Activity.onResume is first called
|
||||
if (CCDirector::sharedDirector()->getOpenGLView())
|
||||
{
|
||||
CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -587,7 +587,7 @@ bool CCEGLView::handleEvents()
|
|||
case NAVIGATOR_WINDOW_INACTIVE:
|
||||
if (m_isWindowActive)
|
||||
{
|
||||
CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
m_isWindowActive = false;
|
||||
}
|
||||
break;
|
||||
|
@ -595,7 +595,7 @@ bool CCEGLView::handleEvents()
|
|||
case NAVIGATOR_WINDOW_ACTIVE:
|
||||
if (!m_isWindowActive)
|
||||
{
|
||||
CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
m_isWindowActive = true;
|
||||
}
|
||||
break;
|
||||
|
@ -607,14 +607,14 @@ bool CCEGLView::handleEvents()
|
|||
case NAVIGATOR_WINDOW_FULLSCREEN:
|
||||
if (!m_isWindowActive)
|
||||
{
|
||||
CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
m_isWindowActive = true;
|
||||
}
|
||||
break;
|
||||
case NAVIGATOR_WINDOW_THUMBNAIL:
|
||||
if (m_isWindowActive)
|
||||
{
|
||||
CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
m_isWindowActive = false;
|
||||
}
|
||||
break;
|
||||
|
@ -673,96 +673,36 @@ bool CCEGLView::handleEvents()
|
|||
|
||||
case SCREEN_EVENT_POINTER:
|
||||
{
|
||||
int buttons;
|
||||
int pair[2];
|
||||
int buttons = 0;
|
||||
int pair_[2] = {0};
|
||||
float pair[2] = {0.0f};
|
||||
static bool mouse_pressed = false;
|
||||
|
||||
// this is a mouse move event, it is applicable to a device with a usb mouse or simulator
|
||||
screen_get_event_property_iv(m_screenEvent, SCREEN_PROPERTY_BUTTONS, &buttons);
|
||||
screen_get_event_property_iv(m_screenEvent, SCREEN_PROPERTY_SOURCE_POSITION, pair);
|
||||
|
||||
screen_get_event_property_iv(m_screenEvent, SCREEN_PROPERTY_SOURCE_POSITION, pair_);
|
||||
pair[0] = (float)pair_[0];
|
||||
pair[1] = (float)pair_[1];
|
||||
if (buttons & SCREEN_LEFT_MOUSE_BUTTON)
|
||||
{
|
||||
if (mouse_pressed)
|
||||
{
|
||||
handleTouchesMove(1, &touch_id, (float *)&pair[0], (float *)&pair[1]);
|
||||
|
||||
/*
|
||||
// Left mouse button was released
|
||||
if (m_pDelegate && touch_id < MAX_TOUCHES)
|
||||
{
|
||||
CCTouch* touch = s_pTouches[touch_id];
|
||||
if (touch)
|
||||
{
|
||||
CCSet set;
|
||||
touch->SetTouchInfo(((float)(pair[0]) - m_rcViewPort.origin.x) / m_fScreenScaleFactor,
|
||||
((float)(pair[1]) - m_rcViewPort.origin.y) / m_fScreenScaleFactor);
|
||||
set.addObject(touch);
|
||||
m_pDelegate->touchesMoved(&set, NULL);
|
||||
}
|
||||
}
|
||||
*/
|
||||
handleTouchesMove(1, &touch_id, &pair[0], &pair[1]);
|
||||
}
|
||||
else
|
||||
{
|
||||
// Left mouse button is pressed
|
||||
mouse_pressed = true;
|
||||
|
||||
handleTouchesBegin(1, &touch_id, (float *)&pair[0], (float *)&pair[1]);
|
||||
|
||||
/*
|
||||
if (m_pDelegate && touch_id < MAX_TOUCHES)
|
||||
{
|
||||
CCTouch* touch = s_pTouches[touch_id];
|
||||
if (!touch)
|
||||
touch = new CCTouch;
|
||||
|
||||
touch->SetTouchInfo(((float)(pair[0]) - m_rcViewPort.origin.x) / m_fScreenScaleFactor,
|
||||
((float)(pair[1]) - m_rcViewPort.origin.y) / m_fScreenScaleFactor);
|
||||
s_pTouches[touch_id] = touch;
|
||||
|
||||
CCSet set;
|
||||
set.addObject(touch);
|
||||
m_pDelegate->touchesBegan(&set, NULL);
|
||||
}
|
||||
*/
|
||||
handleTouchesBegin(1, &touch_id, &pair[0], &pair[1]);
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (mouse_pressed)
|
||||
{
|
||||
handleTouchesEnd(1, &touch_id, (float *)&pair[0], (float *)&pair[1]);
|
||||
|
||||
/*
|
||||
if (m_pDelegate && touch_id < MAX_TOUCHES)
|
||||
{
|
||||
mouse_pressed = false;
|
||||
|
||||
CCTouch* touch = s_pTouches[touch_id];
|
||||
if (touch)
|
||||
{
|
||||
CCSet set;
|
||||
touch->SetTouchInfo(((float)(pair[0]) - m_rcViewPort.origin.x) / m_fScreenScaleFactor,
|
||||
((float)(pair[1]) - m_rcViewPort.origin.y) / m_fScreenScaleFactor);
|
||||
set.addObject(touch);
|
||||
m_pDelegate->touchesEnded(&set, NULL);
|
||||
|
||||
touch->release();
|
||||
for (int i = touch_id; i < MAX_TOUCHES; i++)
|
||||
{
|
||||
if (i != (MAX_TOUCHES - 1))
|
||||
{
|
||||
s_pTouches[i] = s_pTouches[i + 1];
|
||||
}
|
||||
else
|
||||
{
|
||||
s_pTouches[i] = NULL;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
*/
|
||||
mouse_pressed = false;
|
||||
handleTouchesEnd(1, &touch_id, &pair[0], &pair[1]);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
/**
|
||||
@brief get the shared main open gl window
|
||||
*/
|
||||
static CCEGLView sharedOpenGLView();
|
||||
static CCEGLView* sharedOpenGLView();
|
||||
|
||||
bool handleEvents();
|
||||
|
||||
|
|
|
@ -58,10 +58,11 @@ void CCFileUtils::purgeCachedEntries()
|
|||
static std::string fullPathFromRelativePathThreadSafe(const char* pszRelativePath)
|
||||
{
|
||||
std::string ret("");
|
||||
const char* pszRootPath = CCApplication::sharedApplication().getResourceRootPath();
|
||||
const char* pszRootPath = CCApplication::sharedApplication()->getResourceRootPath();
|
||||
CCAssert(pszRootPath != NULL, "The resource root path must be set in the main.cpp");
|
||||
|
||||
std::string pstrRelativePath = pszRelativePath;
|
||||
// if the relative path contains root path, skip it.
|
||||
if (pstrRelativePath.find(pszRootPath) == std::string::npos)
|
||||
{
|
||||
ret += pszRootPath;
|
||||
|
@ -71,7 +72,13 @@ static std::string fullPathFromRelativePathThreadSafe(const char* pszRelativePat
|
|||
|
||||
if (resDir != NULL)
|
||||
{
|
||||
ret += resDir;
|
||||
std::string pstrRootPath = pszRootPath;
|
||||
std::string pstrResourceFullPath = pstrRootPath + resDir;
|
||||
// if the relative path contains root path and resource directory, skip it.
|
||||
if (pstrRelativePath.find(pstrResourceFullPath.c_str()) == std::string::npos)
|
||||
{
|
||||
ret += resDir;
|
||||
}
|
||||
}
|
||||
|
||||
if (pszRelativePath != NULL)
|
||||
|
|
|
@ -178,7 +178,7 @@
|
|||
|
||||
- (NSString*) description
|
||||
{
|
||||
return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], self, backingWidth_, backingHeight_];
|
||||
return [NSString stringWithFormat:@"<%@ = %08X | size = %ix%i>", [self class], (unsigned int)self, backingWidth_, backingHeight_];
|
||||
}
|
||||
|
||||
- (unsigned int) colorRenderBuffer
|
||||
|
|
|
@ -193,20 +193,20 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
|||
if( ! [relPath isAbsolutePath] ) {
|
||||
|
||||
// pathForResource also searches in .lproj directories. issue #1230
|
||||
NSString *file = [relPath lastPathComponent];
|
||||
NSString *lastPathComponent = [relPath lastPathComponent];
|
||||
|
||||
NSMutableString *imageDirectory = [NSMutableString stringWithUTF8String:m_obDirectory.c_str()];
|
||||
NSMutableString *imageDirectoryWithDirectory = imageDirectory;
|
||||
[imageDirectoryWithDirectory appendString:[relPath stringByDeletingLastPathComponent]];
|
||||
NSString *imageDirectory = [relPath stringByDeletingLastPathComponent];
|
||||
NSMutableString *imageDirectoryByAppendDirectory = [NSMutableString stringWithUTF8String:m_obDirectory.c_str()];
|
||||
[imageDirectoryByAppendDirectory appendString:imageDirectory];
|
||||
|
||||
// search path from directory set by setResourceDirectory
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:file
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:lastPathComponent
|
||||
ofType:nil
|
||||
inDirectory:imageDirectoryWithDirectory];
|
||||
inDirectory:imageDirectoryByAppendDirectory];
|
||||
if (fullpath == nil)
|
||||
{
|
||||
// search from root directory
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:file
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:lastPathComponent
|
||||
ofType:nil
|
||||
inDirectory:imageDirectory];
|
||||
}
|
||||
|
|
|
@ -97,7 +97,8 @@ static bool _initWithImage(CGImageRef cgImage, tImageInfo *pImageinfo)
|
|||
CGContextDrawImage(context, CGRectMake(0, 0, pImageinfo->width, pImageinfo->height), cgImage);
|
||||
|
||||
CGContextRelease(context);
|
||||
|
||||
CFRelease(colorSpace);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -227,32 +228,32 @@ static bool _initWithString(const char * pText, cocos2d::CCImage::ETextAlign eAl
|
|||
font = [UIFont fontWithName:fntName size:nSize];
|
||||
if (font)
|
||||
{
|
||||
dim = _calculateStringSizeWithFontOrZFont(str, font, &constrainSize, false);
|
||||
dim = _calculateStringSizeWithFontOrZFont(str, font, &constrainSize, false);
|
||||
}
|
||||
|
||||
if (! font)
|
||||
{
|
||||
font = [[FontManager sharedManager] zFontWithName:fntName pointSize:nSize];
|
||||
if (font)
|
||||
{
|
||||
dim =_calculateStringSizeWithFontOrZFont(str, font, &constrainSize, true);
|
||||
}
|
||||
font = [[FontManager sharedManager] zFontWithName:fntName pointSize:nSize];
|
||||
if (font)
|
||||
{
|
||||
dim =_calculateStringSizeWithFontOrZFont(str, font, &constrainSize, true);
|
||||
}
|
||||
}
|
||||
|
||||
if (! font)
|
||||
{
|
||||
fntName = _isValidFontName(pFontName) ? fntName : @"MarkerFelt-Wide";
|
||||
font = [UIFont fontWithName:fntName size:nSize];
|
||||
fntName = _isValidFontName(pFontName) ? fntName : @"MarkerFelt-Wide";
|
||||
font = [UIFont fontWithName:fntName size:nSize];
|
||||
|
||||
if (! font)
|
||||
{
|
||||
font = [UIFont systemFontOfSize:nSize];
|
||||
}
|
||||
if (! font)
|
||||
{
|
||||
font = [UIFont systemFontOfSize:nSize];
|
||||
}
|
||||
|
||||
if (font)
|
||||
{
|
||||
dim = _calculateStringSizeWithFontOrZFont(str, font, &constrainSize, false);
|
||||
}
|
||||
if (font)
|
||||
{
|
||||
dim = _calculateStringSizeWithFontOrZFont(str, font, &constrainSize, false);
|
||||
}
|
||||
}
|
||||
|
||||
CC_BREAK_IF(! font);
|
||||
|
|
|
@ -109,7 +109,7 @@ Copyright (C) 2008 Apple Inc. All Rights Reserved.
|
|||
@property(readwrite, copy) UITextRange *selectedTextRange;
|
||||
@property(nonatomic, readonly) id<UITextInputTokenizer> tokenizer;
|
||||
@property(nonatomic, readonly, getter = isKeyboardShown) BOOL isKeyboardShown;
|
||||
@property(nonatomic, retain) NSNotification* keyboardShowNotification;
|
||||
@property(nonatomic, copy) NSNotification* keyboardShowNotification;
|
||||
/** creates an initializes an EAGLView with a frame and 0-bit depth buffer, and a RGB565 color buffer */
|
||||
+ (id) viewWithFrame:(CGRect)frame;
|
||||
/** creates an initializes an EAGLView with a frame, a color buffer format, and 0-bit depth buffer */
|
||||
|
|
|
@ -243,7 +243,7 @@ static EAGLView *view = 0;
|
|||
- (void) dealloc
|
||||
{
|
||||
[renderer_ release];
|
||||
[self.keyboardShowNotification release];
|
||||
self.keyboardShowNotification = NULL; // implicit release
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
|
@ -825,7 +825,7 @@ static EAGLView *view = 0;
|
|||
cocos2d::CCIMEDispatcher* dispatcher = cocos2d::CCIMEDispatcher::sharedDispatcher();
|
||||
if (UIKeyboardWillShowNotification == type)
|
||||
{
|
||||
self.keyboardShowNotification = [notif copy];
|
||||
self.keyboardShowNotification = notif; // implicit copy
|
||||
dispatcher->dispatchKeyboardWillShow(notiInfo);
|
||||
}
|
||||
else if (UIKeyboardDidShowNotification == type)
|
||||
|
|
|
@ -38,12 +38,14 @@
|
|||
@end
|
||||
|
||||
@implementation UIAccelerometer (Simulation)
|
||||
|
||||
#pragma clang diagnostic push
|
||||
#pragma clang diagnostic ignored "-Wobjc-protocol-method-implementation"
|
||||
// override the static method and return our simulated version instead
|
||||
+ (UIAccelerometer *)sharedAccelerometer
|
||||
{
|
||||
return [AccelerometerSimulation getAccelerometer];
|
||||
}
|
||||
#pragma clang diagnostic pop
|
||||
@end
|
||||
/*
|
||||
// callback that never got called with CFSocket UDP...
|
||||
|
@ -65,6 +67,14 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
|
||||
@implementation AccelerometerSimulation
|
||||
|
||||
- (void) dealloc {
|
||||
if (sharedAccelerometer) {
|
||||
[sharedAccelerometer release];
|
||||
sharedAccelerometer = NULL;
|
||||
}
|
||||
[super dealloc];
|
||||
}
|
||||
|
||||
// this is straight from developer guide example for multi-threaded notifications
|
||||
- (void) setUpThreadingSupport {
|
||||
if ( notifications ) return;
|
||||
|
@ -124,7 +134,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
};
|
||||
[notificationLock unlock];
|
||||
}
|
||||
|
||||
#ifndef __clang_analyzer__
|
||||
+ (AccelerometerSimulation *)getAccelerometer
|
||||
{
|
||||
if( sharedAccelerometer == NULL )
|
||||
|
@ -132,7 +142,7 @@ static AccelerometerSimulation *sharedAccelerometer = NULL;
|
|||
|
||||
return sharedAccelerometer;
|
||||
}
|
||||
|
||||
#endif
|
||||
- (void)threadLoop:(id)object
|
||||
{
|
||||
char buffer[1024];
|
||||
|
|
|
@ -45,7 +45,7 @@ void CCFileUtils::purgeCachedEntries()
|
|||
|
||||
const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
||||
{
|
||||
const char* pszRootPath = CCApplication::sharedApplication().getResourceRootPath();
|
||||
const char* pszRootPath = CCApplication::sharedApplication()->getResourceRootPath();
|
||||
|
||||
CCString* pRet = CCString::create(pszRootPath);
|
||||
const char* resDir = CCFileUtils::sharedFileUtils()->getResourceDirectory();
|
||||
|
@ -104,7 +104,7 @@ unsigned char* CCFileUtils::getFileData(const char* pszFileName, const char* psz
|
|||
|
||||
string CCFileUtils::getWriteablePath() {
|
||||
//return current resource path
|
||||
return CCApplication::sharedApplication().getResourceRootPath();
|
||||
return CCApplication::sharedApplication()->getResourceRootPath();
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -193,20 +193,20 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
|||
if( ! [relPath isAbsolutePath] ) {
|
||||
|
||||
// pathForResource also searches in .lproj directories. issue #1230
|
||||
NSString *file = [relPath lastPathComponent];
|
||||
NSString *lastPathComponent = [relPath lastPathComponent];
|
||||
|
||||
NSMutableString *imageDirectory = [NSMutableString stringWithUTF8String:m_obDirectory.c_str()];
|
||||
NSMutableString *imageDirectoryWithDirectory = imageDirectory;
|
||||
[imageDirectoryWithDirectory appendString:[relPath stringByDeletingLastPathComponent]];
|
||||
NSString *imageDirectory = [relPath stringByDeletingLastPathComponent];
|
||||
NSMutableString *imageDirectoryByAppendDirectory = [NSMutableString stringWithUTF8String:m_obDirectory.c_str()];
|
||||
[imageDirectoryByAppendDirectory appendString:imageDirectory];
|
||||
|
||||
// search path from directory set by setResourceDirectory
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:file
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:lastPathComponent
|
||||
ofType:nil
|
||||
inDirectory:imageDirectoryWithDirectory];
|
||||
inDirectory:imageDirectoryByAppendDirectory];
|
||||
if (fullpath == nil)
|
||||
{
|
||||
// search from root directory
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:file
|
||||
fullpath = [[NSBundle mainBundle] pathForResource:lastPathComponent
|
||||
ofType:nil
|
||||
inDirectory:imageDirectory];
|
||||
}
|
||||
|
|
|
@ -1 +1 @@
|
|||
9269aad72103fe898f626bacd11c9719e4914743
|
||||
fca49c411a34ba7a373802c3429c0b4d91afecd1
|
|
@ -69,7 +69,7 @@ CCObject* CCAnimationFrame::copyWithZone(CCZone* pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCAnimationFrame();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithSpriteFrame((CCSpriteFrame*)m_pSpriteFrame->copy()->autorelease(),
|
||||
|
@ -232,7 +232,7 @@ CCObject* CCAnimation::copyWithZone(CCZone* pZone)
|
|||
else
|
||||
{
|
||||
pCopy = new CCAnimation();
|
||||
pZone = pNewZone = new CCZone(pCopy);
|
||||
pNewZone = new CCZone(pCopy);
|
||||
}
|
||||
|
||||
pCopy->initWithAnimationFrames(m_pFrames, m_fDelayPerUnit, m_uLoops);
|
||||
|
|
|
@ -1025,7 +1025,7 @@ CCSpriteFrame* CCSprite::displayFrame(void)
|
|||
return CCSpriteFrame::createWithTexture(m_pobTexture,
|
||||
CC_RECT_POINTS_TO_PIXELS(m_obRect),
|
||||
m_bRectRotated,
|
||||
m_obUnflippedOffsetPositionFromCenter,
|
||||
CC_POINT_POINTS_TO_PIXELS(m_obUnflippedOffsetPositionFromCenter),
|
||||
CC_SIZE_POINTS_TO_PIXELS(m_tContentSize));
|
||||
}
|
||||
|
||||
|
|
|
@ -1092,7 +1092,7 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
if (lSeek!=0)
|
||||
{
|
||||
if (ZSEEK64(s->z_filefunc, s->filestream,lSeek,ZLIB_FILEFUNC_SEEK_CUR)==0)
|
||||
lSeek=0;
|
||||
;//lSeek=0;
|
||||
else
|
||||
err=UNZ_ERRNO;
|
||||
}
|
||||
|
@ -1100,10 +1100,10 @@ local int unz64local_GetCurrentFileInfoInternal (unzFile file,
|
|||
if ((file_info.size_file_comment>0) && (commentBufferSize>0))
|
||||
if (ZREAD64(s->z_filefunc, s->filestream,szComment,uSizeRead)!=uSizeRead)
|
||||
err=UNZ_ERRNO;
|
||||
lSeek+=file_info.size_file_comment - uSizeRead;
|
||||
//lSeek+=file_info.size_file_comment - uSizeRead;
|
||||
}
|
||||
else
|
||||
lSeek+=file_info.size_file_comment;
|
||||
//else
|
||||
// lSeek+=file_info.size_file_comment;
|
||||
|
||||
|
||||
if ((err==UNZ_OK) && (pfile_info!=NULL))
|
||||
|
@ -1536,7 +1536,7 @@ int ZEXPORT unzOpenCurrentFile3 (unzFile file, int* method,
|
|||
/* #endif */
|
||||
(s->cur_file_info.compression_method!=Z_DEFLATED))
|
||||
|
||||
err=UNZ_BADZIPFILE;
|
||||
//err=UNZ_BADZIPFILE;
|
||||
|
||||
pfile_in_zip_read_info->crc32_wait=s->cur_file_info.crc;
|
||||
pfile_in_zip_read_info->crc32=0;
|
||||
|
|
|
@ -267,7 +267,7 @@ bool CCTexturePVR::unpackPVRData(unsigned char* data, unsigned int len)
|
|||
}
|
||||
|
||||
dataSize = widthBlocks * heightBlocks * ((blockSize * bpp) / 8);
|
||||
float packetLength = (dataLength - dataOffset);
|
||||
unsigned int packetLength = (dataLength - dataOffset);
|
||||
packetLength = packetLength > dataSize ? dataSize : packetLength;
|
||||
|
||||
//Make record to the mipmaps array and increment coutner
|
||||
|
|
|
@ -349,20 +349,17 @@ void CCTMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
|
|||
std::string externalTilesetFilename = valueForKey("source", attributeDict);
|
||||
if (externalTilesetFilename != "")
|
||||
{
|
||||
if (m_sTMXFileName.length() == 0)
|
||||
if (m_sTMXFileName.find_last_of("/") != string::npos)
|
||||
{
|
||||
string pszFullPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(m_sResources.c_str());
|
||||
if (pszFullPath.find_last_of("/\\") != pszFullPath.length()-1)
|
||||
{
|
||||
pszFullPath.append("/");
|
||||
}
|
||||
|
||||
externalTilesetFilename = CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile(externalTilesetFilename.c_str(), pszFullPath.c_str() );
|
||||
string dir = m_sTMXFileName.substr(0, m_sTMXFileName.find_last_of("/") + 1);
|
||||
externalTilesetFilename = dir + externalTilesetFilename;
|
||||
}
|
||||
else
|
||||
else
|
||||
{
|
||||
externalTilesetFilename = CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile(externalTilesetFilename.c_str(), pTMXMapInfo->getTMXFileName());
|
||||
externalTilesetFilename = m_sResources + "/" + externalTilesetFilename;
|
||||
}
|
||||
externalTilesetFilename = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(externalTilesetFilename.c_str());
|
||||
|
||||
pTMXMapInfo->parseXMLFile(externalTilesetFilename.c_str());
|
||||
}
|
||||
else
|
||||
|
@ -448,19 +445,15 @@ void CCTMXMapInfo::startElement(void *ctx, const char *name, const char **atts)
|
|||
|
||||
// build full path
|
||||
std::string imagename = valueForKey("source", attributeDict);
|
||||
if (m_sTMXFileName.length() == 0)
|
||||
{
|
||||
string pszFullPath = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath(m_sResources.c_str());
|
||||
if (pszFullPath.find_last_of("/\\") != pszFullPath.length()-1)
|
||||
{
|
||||
pszFullPath.append("/");
|
||||
}
|
||||
|
||||
tileset->m_sSourceImage = CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile(imagename.c_str(), pszFullPath.c_str() );
|
||||
}
|
||||
else
|
||||
if (m_sTMXFileName.find_last_of("/") != string::npos)
|
||||
{
|
||||
tileset->m_sSourceImage = CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile(imagename.c_str(), pTMXMapInfo->getTMXFileName());
|
||||
string dir = m_sTMXFileName.substr(0, m_sTMXFileName.find_last_of("/") + 1);
|
||||
tileset->m_sSourceImage = dir + imagename;
|
||||
}
|
||||
else
|
||||
{
|
||||
tileset->m_sSourceImage = m_sResources + "/" + imagename;
|
||||
}
|
||||
}
|
||||
else if(elementName == "data")
|
||||
|
|
|
@ -157,7 +157,9 @@ void CCTileMapAtlas::setTile(const ccColor3B& tile, const ccGridSize& position)
|
|||
|
||||
// XXX: this method consumes a lot of memory
|
||||
// XXX: a tree of something like that shall be impolemented
|
||||
CCInteger *num = (CCInteger*)m_pPosToAtlasIndex->objectForKey(CCString::createWithFormat("%d,%d", position.x, position.y)->getCString());
|
||||
CCInteger *num = (CCInteger*)m_pPosToAtlasIndex->objectForKey(CCString::createWithFormat("%ld,%ld",
|
||||
(long)position.x,
|
||||
(long)position.y)->getCString());
|
||||
this->updateAtlasValueAt(position, tile, num->getValue());
|
||||
}
|
||||
}
|
||||
|
|
|
@ -0,0 +1,85 @@
|
|||
#!/bin/sh
|
||||
|
||||
HELLOWORLD_ROOT=`pwd`/template/blackberry
|
||||
|
||||
# make directory qnx and copy all files and directories into it
|
||||
copy_qnx_folder(){
|
||||
if [ -d $PROJECT_DIR/proj.blackberry ]; then
|
||||
echo "The '$PROJECT_NAME' project exists, can't override! Please input again!"
|
||||
create_qnx_project
|
||||
exit
|
||||
fi
|
||||
mkdir $PROJECT_DIR/proj.blackberry
|
||||
echo $HELLOWORLD_ROOT
|
||||
for file in `ls -a $HELLOWORLD_ROOT/proj.blackberry | grep -E '\.(project|cproject|xml|png|cpp)' `
|
||||
do
|
||||
file=$HELLOWORLD_ROOT/proj.blackberry/$file
|
||||
if [ -f $file ];then
|
||||
#echo $file
|
||||
cp $file $PROJECT_DIR/proj.blackberry
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
copy_cpp_h_from_helloworld(){
|
||||
if [ -d $PROJECT_DIR/Classes ]; then
|
||||
echo "Classes folder exists, skip copying Classes folder!"
|
||||
else
|
||||
mkdir $PROJECT_DIR/Classes
|
||||
for file in `ls $HELLOWORLD_ROOT/Classes/* | grep -E '.(cpp|h|mk)' `
|
||||
do
|
||||
if [ -f $file ];then
|
||||
#echo $file
|
||||
cp $file $PROJECT_DIR/Classes
|
||||
fi
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# copy resources
|
||||
copy_resouces(){
|
||||
if [ -d $PROJECT_DIR/Resources ]; then
|
||||
echo "Resources folder exists, skip copying Resources folder!"
|
||||
else
|
||||
mkdir $PROJECT_DIR/Resources
|
||||
|
||||
for file in $HELLOWORLD_ROOT/Resources/*
|
||||
do
|
||||
#echo $file
|
||||
cp $file $PROJECT_DIR/Resources
|
||||
done
|
||||
fi
|
||||
}
|
||||
|
||||
# replace string
|
||||
modify_file_content(){
|
||||
# here should use # instead of /, why??
|
||||
sed "s#$2#$3#" $PROJECT_DIR/proj.blackberry/$1 > $PROJECT_DIR/proj.blackberry/tmp.txt
|
||||
rm $PROJECT_DIR/proj.blackberry/$1
|
||||
mv $PROJECT_DIR/proj.blackberry/tmp.txt $PROJECT_DIR/proj.blackberry/$1
|
||||
}
|
||||
|
||||
create_qnx_project(){
|
||||
echo "Please input your project name:"
|
||||
read PROJECT_NAME
|
||||
PROJECT_DIR=`pwd`/$PROJECT_NAME
|
||||
|
||||
# check if PROJECT_DIR is exist
|
||||
if [ -d $PROJECT_DIR ]; then
|
||||
echo ""
|
||||
else
|
||||
mkdir $PROJECT_DIR
|
||||
fi
|
||||
|
||||
copy_qnx_folder
|
||||
modify_file_content .project BBTemplateProject $PROJECT_NAME
|
||||
modify_file_content .cproject BBTemplateProject $PROJECT_NAME
|
||||
modify_file_content bar-descriptor.xml BBTemplateProject $PROJECT_NAME
|
||||
modify_file_content .cproject ../../../.. ../../..
|
||||
modify_file_content bar-descriptor.xml ../../../.. ../../..
|
||||
copy_cpp_h_from_helloworld
|
||||
copy_resouces
|
||||
echo "Congratulations, the '$PROJECT_NAME' project have been created successfully, please use QNX IDE to import the project!"
|
||||
}
|
||||
|
||||
create_qnx_project
|
|
@ -0,0 +1,81 @@
|
|||
set fso = Wscript.CreateObject("Scripting.FileSystemObject")
|
||||
|
||||
dim szPrompt, msgRet
|
||||
szPrompt = "Prompt"
|
||||
|
||||
function ReplaceFileContent(fileName, oldStr, newStr)
|
||||
set f = fso.opentextfile(fileName)
|
||||
s = replace(f.readall, oldStr, newStr)
|
||||
f.close
|
||||
set r = fso.opentextfile(fileName, 2, true)
|
||||
r.write s
|
||||
end function
|
||||
|
||||
function CopyFolder(srcFolder, desFolder)
|
||||
if (fso.FolderExists(desFolder)) then
|
||||
'msgbox("none:"+srcFolder+":"+desFolder)
|
||||
'If the desFolder exist, do nothing.
|
||||
else
|
||||
CopyFolder = fso.CopyFolder(srcFolder, desFolder)
|
||||
end if
|
||||
end function
|
||||
|
||||
function ConfigureProject()
|
||||
dim szProjectName
|
||||
szProjectName = Inputbox("Please Input Project Name:", szPrompt)
|
||||
|
||||
if szProjectName = "" then
|
||||
Wscript.quit
|
||||
end if
|
||||
|
||||
if (0 = strcomp(szProjectName, "HelloWorld", 1) or 0 = strcomp(szProjectName, "tests", 1)) then
|
||||
msgRet = msgbox("Can not create a project named with "+szProjectName+", Please input again!", 1, szPrompt)
|
||||
if (msgRet = 1) then
|
||||
call ConfigureProject
|
||||
end if
|
||||
Wscript.quit
|
||||
end if
|
||||
|
||||
if (fso.FolderExists(szProjectName)) then
|
||||
else
|
||||
fso.CreateFolder(szProjectName)
|
||||
end if
|
||||
|
||||
dim qnxFolder
|
||||
qnxFolder = szProjectName + "\proj.blackberry"
|
||||
if (fso.FolderExists(qnxFolder)) then
|
||||
msgRet = msgbox("The '"+szProjectName+"' project exists, can't override! Please input again!", 1, szPrompt)
|
||||
if (msgRet = 1) then
|
||||
call ConfigureProject
|
||||
end if
|
||||
Wcript.quit
|
||||
end if
|
||||
|
||||
dim szSrcClass, szSrcQnx, szSrcResource
|
||||
dim szDesClass, szDesQnx, szDesResource
|
||||
|
||||
szSrcClass = "template\blackberry\Classes"
|
||||
szSrcQnx = "template\blackberry\proj.blackberry"
|
||||
szSrcResource = "template\blackberry\Resources"
|
||||
|
||||
szDesClass = szProjectName+"\Classes"
|
||||
szDesQnx = szProjectName+"\proj.blackberry"
|
||||
szDesResource = szProjectName+"\Resources"
|
||||
|
||||
call CopyFolder(szSrcClass, szDesClass)
|
||||
call CopyFolder(szSrcQnx, szDesQnx)
|
||||
call CopyFolder(szSrcResource, szDesResource)
|
||||
|
||||
call ReplaceFileContent(szProjectName+"\proj.blackberry\bar-descriptor.xml", "BBTemplateProject", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\proj.blackberry\bar-descriptor.xml", "../../../..", "../../..")
|
||||
call ReplaceFileContent(szProjectName+"\proj.blackberry\.project", "BBTemplateProject", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\proj.blackberry\.cproject", "BBTemplateProject", szProjectName)
|
||||
call ReplaceFileContent(szProjectName+"\proj.blackberry\.cproject", "../../../..", "../../..")
|
||||
|
||||
|
||||
call msgbox("Congratulations, the '"+szProjectName+"' project have been created successfully, please use QNX IDE to import the project!", 0, szPrompt)
|
||||
|
||||
end function
|
||||
|
||||
call ConfigureProject
|
||||
Wscript.quit
|
|
@ -0,0 +1,3 @@
|
|||
html/
|
||||
.tee-*.txt
|
||||
|
|
@ -35,6 +35,8 @@ GUI/CCControlExtension/CCMenuPassive.cpp \
|
|||
GUI/CCControlExtension/CCScale9Sprite.cpp \
|
||||
GUI/CCControlExtension/CCSpacer.cpp \
|
||||
GUI/CCScrollView/CCScrollView.cpp \
|
||||
GUI/CCEditBox/CCEditBox.cpp \
|
||||
GUI/CCEditBox/CCEditBoxImplAndroid.cpp \
|
||||
network/HttpClient.cpp
|
||||
|
||||
LOCAL_WHOLE_STATIC_LIBRARIES := cocos2dx_static
|
||||
|
|
|
@ -86,7 +86,7 @@ bool CCEditBox::initWithSizeAndBackgroundSprite(const CCSize& size, CCScale9Spri
|
|||
|
||||
this->setPreferredSize(size);
|
||||
this->setPosition(ccp(0, 0));
|
||||
this->addTargetWithActionForControlEvent(this, cccontrol_selector(CCEditBox::touchDownAction), CCControlEventTouchDown);
|
||||
this->addTargetWithActionForControlEvent(this, cccontrol_selector(CCEditBox::touchDownAction), CCControlEventTouchUpInside);
|
||||
|
||||
return true;
|
||||
}
|
||||
|
|
|
@ -0,0 +1,237 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2012 James Chen
|
||||
|
||||
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 "CCEditBoxImplAndroid.h"
|
||||
#include "CCEditBox.h"
|
||||
#include "jni/EditBoxJni.h"
|
||||
|
||||
// This function is implemented in CCLabelBMFont.cpp
|
||||
|
||||
NS_CC_BEGIN
|
||||
extern long cc_utf8_strlen (const char * p, int max);
|
||||
NS_CC_END
|
||||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
CCEditBoxImpl* __createSystemEditBox(CCEditBox* pEditBox)
|
||||
{
|
||||
return new CCEditBoxImplAndroid(pEditBox);
|
||||
}
|
||||
|
||||
CCEditBoxImplAndroid::CCEditBoxImplAndroid(CCEditBox* pEditText)
|
||||
: CCEditBoxImpl(pEditText)
|
||||
, m_pLabel(NULL)
|
||||
, m_pLabelPlaceHolder(NULL)
|
||||
, m_eEditBoxInputMode(kEditBoxInputModeSingleLine)
|
||||
, m_eEditBoxInputFlag(kEditBoxInputFlagInitialCapsAllCharacters)
|
||||
, m_eKeyboardReturnType(kKeyboardReturnTypeDefault)
|
||||
, m_colText(ccWHITE)
|
||||
, m_colPlaceHolder(ccGRAY)
|
||||
, m_nMaxLength(-1)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
CCEditBoxImplAndroid::~CCEditBoxImplAndroid()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::doAnimationWhenKeyboardMove(float duration, float distance)
|
||||
{ // don't need to be implemented on android platform.
|
||||
|
||||
}
|
||||
|
||||
bool CCEditBoxImplAndroid::initWithSize(const CCSize& size)
|
||||
{
|
||||
int fontSize = getFontSizeAccordingHeightJni(size.height-12);
|
||||
m_pLabel = CCLabelTTF::create("", "", size.height-12);
|
||||
m_pLabel->setAnchorPoint(ccp(0, 0));
|
||||
m_pLabel->setPosition(ccp(5, 2));
|
||||
m_pLabel->setColor(m_colText);
|
||||
m_pEditBox->addChild(m_pLabel);
|
||||
|
||||
m_pLabelPlaceHolder = CCLabelTTF::create("", "", size.height-12);
|
||||
m_pLabelPlaceHolder->setAnchorPoint(ccp(0, 0));
|
||||
m_pLabelPlaceHolder->setPosition(ccp(5, 2));
|
||||
m_pLabelPlaceHolder->setVisible(false);
|
||||
m_pLabelPlaceHolder->setColor(m_colPlaceHolder);
|
||||
m_pEditBox->addChild(m_pLabelPlaceHolder);
|
||||
|
||||
m_EditSize = size;
|
||||
return true;
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setFontColor(const ccColor3B& color)
|
||||
{
|
||||
m_colText = color;
|
||||
m_pLabel->setColor(color);
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setPlaceholderFontColor(const ccColor3B& color)
|
||||
{
|
||||
m_colPlaceHolder = color;
|
||||
m_pLabelPlaceHolder->setColor(color);
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setInputMode(EditBoxInputMode inputMode)
|
||||
{
|
||||
m_eEditBoxInputMode = inputMode;
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setMaxLength(int maxLength)
|
||||
{
|
||||
m_nMaxLength = maxLength;
|
||||
}
|
||||
|
||||
int CCEditBoxImplAndroid::getMaxLength()
|
||||
{
|
||||
return m_nMaxLength;
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setInputFlag(EditBoxInputFlag inputFlag)
|
||||
{
|
||||
m_eEditBoxInputFlag = inputFlag;
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setReturnType(KeyboardReturnType returnType)
|
||||
{
|
||||
m_eKeyboardReturnType = returnType;
|
||||
}
|
||||
|
||||
bool CCEditBoxImplAndroid::isEditing()
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setText(const char* pText)
|
||||
{
|
||||
if (pText != NULL)
|
||||
{
|
||||
m_strText = pText;
|
||||
|
||||
if (m_strText.length() > 0)
|
||||
{
|
||||
m_pLabelPlaceHolder->setVisible(false);
|
||||
|
||||
std::string strToShow;
|
||||
|
||||
if (kEditBoxInputFlagPassword == m_eEditBoxInputFlag)
|
||||
{
|
||||
long length = cc_utf8_strlen(m_strText.c_str(), -1);
|
||||
for (long i = 0; i < length; i++)
|
||||
{
|
||||
strToShow.append("*");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
strToShow = m_strText;
|
||||
}
|
||||
|
||||
std::string strWithEllipsis = getStringWithEllipsisJni(strToShow.c_str(), m_EditSize.width, m_EditSize.height-12);
|
||||
m_pLabel->setString(strWithEllipsis.c_str());
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pLabelPlaceHolder->setVisible(true);
|
||||
m_pLabel->setString("");
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
const char* CCEditBoxImplAndroid::getText(void)
|
||||
{
|
||||
return m_strText.c_str();
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setPlaceHolder(const char* pText)
|
||||
{
|
||||
if (pText != NULL)
|
||||
{
|
||||
m_strPlaceHolder = pText;
|
||||
if (m_strPlaceHolder.length() > 0 && m_strText.length() == 0)
|
||||
{
|
||||
m_pLabelPlaceHolder->setVisible(true);
|
||||
}
|
||||
|
||||
m_pLabelPlaceHolder->setString(m_strPlaceHolder.c_str());
|
||||
}
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setPosition(const CCPoint& pos)
|
||||
{ // don't need to be implemented on android platform.
|
||||
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::setContentSize(const CCSize& size)
|
||||
{ // don't need to be implemented on android platform.
|
||||
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::visit(void)
|
||||
{ // don't need to be implemented on android platform.
|
||||
|
||||
}
|
||||
|
||||
static void editBoxCallbackFunc(const char* pText, void* ctx)
|
||||
{
|
||||
CCEditBoxImplAndroid* thiz = (CCEditBoxImplAndroid*)ctx;
|
||||
thiz->setText(pText);
|
||||
|
||||
if (thiz->getDelegate() != NULL)
|
||||
{
|
||||
thiz->getDelegate()->editBoxTextChanged(thiz->getCCEditBox(), thiz->getText());
|
||||
thiz->getDelegate()->editBoxEditingDidEnd(thiz->getCCEditBox());
|
||||
thiz->getDelegate()->editBoxReturn(thiz->getCCEditBox());
|
||||
}
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::openKeyboard()
|
||||
{
|
||||
if (m_pDelegate != NULL)
|
||||
{
|
||||
m_pDelegate->editBoxEditingDidBegin(m_pEditBox);
|
||||
}
|
||||
|
||||
showEditBoxDialogJni( m_strPlaceHolder.c_str(),
|
||||
m_strText.c_str(),
|
||||
m_eEditBoxInputMode,
|
||||
m_eEditBoxInputFlag,
|
||||
m_eKeyboardReturnType,
|
||||
m_nMaxLength,
|
||||
editBoxCallbackFunc,
|
||||
(void*)this );
|
||||
|
||||
}
|
||||
|
||||
void CCEditBoxImplAndroid::closeKeyboard()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
NS_CC_EXT_END
|
||||
|
|
@ -0,0 +1,84 @@
|
|||
/****************************************************************************
|
||||
Copyright (c) 2010-2012 cocos2d-x.org
|
||||
Copyright (c) 2012 James Chen
|
||||
|
||||
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 __CCEDITBOXIMPLANDROID_H__
|
||||
#define __CCEDITBOXIMPLANDROID_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
#include "ExtensionMacros.h"
|
||||
#include "CCEditBoxImpl.h"
|
||||
|
||||
NS_CC_EXT_BEGIN
|
||||
|
||||
class CCEditBox;
|
||||
|
||||
class CCEditBoxImplAndroid : public CCEditBoxImpl
|
||||
{
|
||||
public:
|
||||
CCEditBoxImplAndroid(CCEditBox* pEditText);
|
||||
virtual ~CCEditBoxImplAndroid();
|
||||
|
||||
virtual bool initWithSize(const CCSize& size);
|
||||
virtual void setFontColor(const ccColor3B& color);
|
||||
virtual void setPlaceholderFontColor(const ccColor3B& color);
|
||||
virtual void setInputMode(EditBoxInputMode inputMode);
|
||||
virtual void setInputFlag(EditBoxInputFlag inputFlag);
|
||||
virtual void setMaxLength(int maxLength);
|
||||
virtual int getMaxLength();
|
||||
virtual void setReturnType(KeyboardReturnType returnType);
|
||||
virtual bool isEditing();
|
||||
|
||||
virtual void setText(const char* pText);
|
||||
virtual const char* getText(void);
|
||||
virtual void setPlaceHolder(const char* pText);
|
||||
virtual void setPosition(const CCPoint& pos);
|
||||
virtual void setContentSize(const CCSize& size);
|
||||
virtual void visit(void);
|
||||
virtual void doAnimationWhenKeyboardMove(float duration, float distance);
|
||||
virtual void openKeyboard();
|
||||
virtual void closeKeyboard();
|
||||
|
||||
private:
|
||||
CCLabelTTF* m_pLabel;
|
||||
CCLabelTTF* m_pLabelPlaceHolder;
|
||||
EditBoxInputMode m_eEditBoxInputMode;
|
||||
EditBoxInputFlag m_eEditBoxInputFlag;
|
||||
KeyboardReturnType m_eKeyboardReturnType;
|
||||
|
||||
std::string m_strText;
|
||||
std::string m_strPlaceHolder;
|
||||
|
||||
ccColor3B m_colText;
|
||||
ccColor3B m_colPlaceHolder;
|
||||
|
||||
int m_nMaxLength;
|
||||
CCSize m_EditSize;
|
||||
};
|
||||
|
||||
|
||||
NS_CC_EXT_END
|
||||
|
||||
#endif /* __CCEDITBOXIMPLANDROID_H__ */
|
||||
|
|
@ -61,7 +61,6 @@ public:
|
|||
virtual void closeKeyboard();
|
||||
|
||||
private:
|
||||
CCEditBox* m_pEditBox;
|
||||
CCSize m_tContentSize;
|
||||
void* m_pSysEdit;
|
||||
int m_nMaxTextLength;
|
||||
|
|
|
@ -37,8 +37,7 @@ import android.widget.FrameLayout;
|
|||
import android.view.ViewGroup;
|
||||
|
||||
public class HelloCpp extends Cocos2dxActivity{
|
||||
private Cocos2dxGLSurfaceView mGLView;
|
||||
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
|
||||
|
|
|
@ -68,7 +68,7 @@
|
|||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1794064552" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.1757627798" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx/Device-Debug}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx/Device-Release}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
|
@ -97,7 +97,7 @@
|
|||
<externalSettings containerId="cocos2dx;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/cocos2dx"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx/Device-Debug"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx/Device-Release"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cocos2dx"/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
|
@ -131,13 +131,12 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1481914218" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
|
@ -166,14 +165,11 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.1491934160" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.2141259757" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.blackberry/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.blackberry/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1321710093" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -220,13 +216,12 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.949042507" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
|
@ -257,14 +252,11 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.150600101" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1370019185" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.blackberry/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.blackberry/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1078171597" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -311,13 +303,12 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.901688047" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
|
@ -327,7 +318,7 @@
|
|||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1367226426" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.1276383563" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.coverage.390406687" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.coverage.390406687" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.1160718760" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1736864271" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
|
@ -348,14 +339,11 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.322375874" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.619637072" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.blackberry/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.blackberry/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1438498440" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -400,13 +388,12 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1997773972" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
|
@ -436,15 +423,12 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.927694704" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.objectFiles.1451516298" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.526534847" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.blackberry/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.blackberry/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.439307041" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -490,13 +474,12 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1682829736" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
|
@ -527,14 +510,11 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.681434121" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.536840311" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.blackberry/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.blackberry/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.2044213175" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
@ -580,13 +560,12 @@
|
|||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/include/chipmunk"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.616747785" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
|
@ -596,7 +575,7 @@
|
|||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.35285082" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.1514682747" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.coverage.1881413807" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.coverage.1881413807" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.769428310" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1325336223" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
|
@ -617,14 +596,11 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.1115848281" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.259366688" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../Box2D/proj.blackberry/${ConfigName}/libBox2D.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../chipmunk/proj.blackberry/${ConfigName}/libchipmunk.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.780133405" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
|
|
|
@ -25,6 +25,8 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
|
||||
|
||||
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(480, 320, kResolutionShowAll);
|
||||
|
||||
// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
|
||||
// pDirector->enableRetinaDisplay(true);
|
||||
|
|
|
@ -147,7 +147,8 @@ local function createLayerMenu()
|
|||
|
||||
local function menuCallbackOpenPopup()
|
||||
-- loop test sound effect
|
||||
effectID = SimpleAudioEngine:sharedEngine():playEffect("effect1.wav")
|
||||
local effectPath = CCFileUtils:sharedFileUtils():fullPathFromRelativePath("effect1.wav")
|
||||
effectID = SimpleAudioEngine:sharedEngine():playEffect(effectPath)
|
||||
menuPopup:setVisible(true)
|
||||
end
|
||||
|
||||
|
@ -172,8 +173,13 @@ local function createLayerMenu()
|
|||
end
|
||||
|
||||
-- play background music, preload effect
|
||||
SimpleAudioEngine:sharedEngine():playBackgroundMusic("background.mp3", true);
|
||||
SimpleAudioEngine:sharedEngine():preloadEffect("effect1.wav");
|
||||
|
||||
-- uncomment below for the BlackBerry version
|
||||
-- local bgMusicPath = CCFileUtils:sharedFileUtils():fullPathFromRelativePath("background.ogg")
|
||||
local bgMusicPath = CCFileUtils:sharedFileUtils():fullPathFromRelativePath("background.mp3")
|
||||
SimpleAudioEngine:sharedEngine():playBackgroundMusic(bgMusicPath, true)
|
||||
local effectPath = CCFileUtils:sharedFileUtils():fullPathFromRelativePath("effect1.wav")
|
||||
SimpleAudioEngine:sharedEngine():preloadEffect(effectPath)
|
||||
|
||||
-- run
|
||||
local sceneGame = CCScene:create()
|
||||
|
|
|
@ -101,8 +101,6 @@ public class HelloLua extends Cocos2dxActivity{
|
|||
ConfigurationInfo info = am.getDeviceConfigurationInfo();
|
||||
return (info.reqGlEsVersion >= 0x20000);
|
||||
}
|
||||
|
||||
private LuaGLSurfaceView mGLView;
|
||||
|
||||
|
||||
static {
|
||||
|
|
|
@ -0,0 +1,738 @@
|
|||
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||
<?fileVersion 4.0.0?>
|
||||
|
||||
<cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.debug.446234419">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.debug.446234419" moduleId="org.eclipse.cdt.core.settings" name="Device-Debug">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.debug.446234419" name="Device-Debug" parent="com.qnx.qcc.configuration.exe.debug">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.debug.446234419." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.debug.2114985022" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.cpu.476871357" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.243174525" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Device-Debug}" id="com.qnx.nto.476715223" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1144576773" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compile.debug.477981148" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.950802078" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.947876049" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.892081154" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.qccoptions.1299872702" name="QCC Options" superClass="com.qnx.qcc.option.compiler.qccoptions"/>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1174705489" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.298372204" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.debug.1245805836" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.assembler.includePath.1902231095" name="Include Directories (-I)" superClass="com.qnx.qcc.option.assembler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.954888053" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1869091739" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.2017324338" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.670245200" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1760958269" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1794064552" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.1757627798" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx/Device-Release}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1363839882" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.qccoptions.1444329036" name="QCC Options" superClass="com.qnx.qcc.option.linker.qccoptions"/>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.697035559" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.301444246" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings">
|
||||
<externalSettings containerId="cocos2dx;" factoryId="org.eclipse.cdt.core.cfg.export.settings.sipplier">
|
||||
<externalSetting>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="includePath" name="/cocos2dx"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="libraryPath" name="/cocos2dx/Device-Release"/>
|
||||
<entry flags="RESOLVED" kind="libraryFile" name="cocos2dx"/>
|
||||
</externalSetting>
|
||||
</externalSettings>
|
||||
</storageModule>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.release.1265921422">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.release.1265921422" moduleId="org.eclipse.cdt.core.settings" name="Device-Release">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.release.1265921422" name="Device-Release" parent="com.qnx.qcc.configuration.exe.release">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.release.1265921422." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.release.4046903" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.cpu.49495308" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2115941098" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Device-Release}" id="com.qnx.nto.1079130834" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.489158604" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compiler.optlevel.1816856148" name="Optimization Level" superClass="com.qnx.qcc.option.compiler.optlevel" value="com.qnx.qcc.option.compiler.optlevel.2" valueType="enumerated"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.516815496" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.1389762293" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.pie.456946828" name="Position Independent Executable (-fPIE)" superClass="com.qnx.qcc.option.compiler.pie" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1777714844" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1481914218" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1981472408" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1358975089" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1460295121" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.1928031496" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1701813567" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1061945690" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.pie.2077677263" name="Position Independent Executable (-pie)" superClass="com.qnx.qcc.option.linker.pie" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.1491934160" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.2141259757" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1321710093" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1156203201" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.1761000041">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.1761000041" moduleId="org.eclipse.cdt.core.settings" name="Device-Profile">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Profiling" id="com.qnx.qcc.configuration.exe.profile.1761000041" name="Device-Profile" parent="com.qnx.qcc.configuration.exe.profile">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.profile.1761000041." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.profile.1124526836" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.cpu.463099906" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.2119914966" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Device-Profile}" id="com.qnx.nto.375294946" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1156975065" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compile.debug.516699842" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.profile2.827918638" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.90830663" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.2011249500" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.2118671865" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.949042507" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.204612102" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.debug.1402394581" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.51504326" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.757736298" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.2002086963" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.profile2.1064338465" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.1232550377" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1289108024" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.29518400" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.150600101" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1370019185" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1078171597" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1781241255" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181" moduleId="org.eclipse.cdt.core.settings" name="Device-Coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Code Coverage" id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181" name="Device-Coverage" parent="com.qnx.qcc.configuration.exe.profile.coverage">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.coverage.1048447960" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<option id="com.qnx.qcc.option.cpu.1184616968" name="Target CPU:" superClass="com.qnx.qcc.option.cpu" value="com.qnx.qcc.option.gen.cpu.armle-v7" valueType="enumerated"/>
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.617597973" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Device-Coverage}" id="com.qnx.nto.168144620" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1214860716" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compile.debug.1865580810" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.coverage.417773989" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.2078595424" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.2117581868" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1766273669" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.901688047" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1913823743" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.debug.585829451" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.652294347" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1367226426" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.1276383563" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.coverage.390406687" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.1160718760" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1736864271" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.1670627205" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.322375874" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.619637072" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.1438498440" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.30542244" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.debug.660208940">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.debug.660208940" moduleId="org.eclipse.cdt.core.settings" name="Simulator">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="" id="com.qnx.qcc.configuration.exe.debug.660208940" name="Simulator" parent="com.qnx.qcc.configuration.exe.debug">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.debug.660208940." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.debug.268891510" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.240715499" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Simulator}" id="com.qnx.nto.1270333356" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.431759757" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compile.debug.2024008205" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.2119227735" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.250718869" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1838736665" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1997773972" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1469514654" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.debug.1201110421" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.971190882" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.1378371763" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.1155728719" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.550638471" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1179286572" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.2014666509" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.927694704" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.objectFiles.1451516298" name="Additional Object Files" superClass="com.qnx.qcc.option.linker.objectFiles"/>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.526534847" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.439307041" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.1720091399" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.1237484173">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.1237484173" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Profile">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.profile,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Profiling" id="com.qnx.qcc.configuration.exe.profile.1237484173" name="Simulator-Profile" parent="com.qnx.qcc.configuration.exe.profile">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.profile.1237484173." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.profile.895301801" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.191826099" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Simulator-Profile}" id="com.qnx.nto.47902617" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1309978635" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compile.debug.347183646" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.profile2.53874439" name="Build for Profiling (Function Instrumentation) (-finstrument-functions)" superClass="com.qnx.qcc.option.compiler.profile2" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.728843003" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.307652248" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1315014042" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.1682829736" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.807410238" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.debug.1290612958" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.1525407149" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.680182007" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.925450350" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.profile2.1569002848" name="Build for Profiling (Function Instrumentation) (-lprofiling)" superClass="com.qnx.qcc.option.linker.profile2" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.1840561937" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1031790004" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.931994389" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.681434121" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.536840311" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.2044213175" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.924511539" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
<cconfiguration id="com.qnx.qcc.configuration.exe.profile.coverage.181538713">
|
||||
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="com.qnx.qcc.configuration.exe.profile.coverage.181538713" moduleId="org.eclipse.cdt.core.settings" name="Simulator-Coverage">
|
||||
<externalSettings/>
|
||||
<extensions>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDEBynaryParser" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||
<extension id="com.qnx.tools.ide.qde.core.QDELinkerErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||
</extensions>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildType=com.qnx.buildType.coverage,org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe" description="Build for Code Coverage" id="com.qnx.qcc.configuration.exe.profile.coverage.181538713" name="Simulator-Coverage" parent="com.qnx.qcc.configuration.exe.profile.coverage">
|
||||
<folderInfo id="com.qnx.qcc.configuration.exe.profile.coverage.181538713." name="/" resourcePath="">
|
||||
<toolChain id="com.qnx.qcc.toolChain.exe.coverage.2030436518" name="QNX QCC" superClass="com.qnx.qcc.toolChain">
|
||||
<targetPlatform archList="all" binaryParser="com.qnx.tools.ide.qde.core.QDEBynaryParser" id="com.qnx.qcc.targetPlatform.538034305" osList="all" superClass="com.qnx.qcc.targetPlatform"/>
|
||||
<builder buildPath="${workspace_loc:/HelloLua/Simulator-Coverage}" id="com.qnx.nto.411824448" keepEnvironmentInBuildfile="false" name="CDT Internal Builder" superClass="com.qnx.nto"/>
|
||||
<tool id="com.qnx.qcc.tool.compiler.1856118712" name="QCC Compiler" superClass="com.qnx.qcc.tool.compiler">
|
||||
<option id="com.qnx.qcc.option.compile.debug.367463903" name="Debug (-g)" superClass="com.qnx.qcc.option.compile.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.coverage.2144541749" name="Build for Code Coverage (-Wc,-ftest-coverage -Wc,-fprofile-arcs)" superClass="com.qnx.qcc.option.compiler.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.security.2041278353" name="Enhanced Security (-fstack-protector-all)" superClass="com.qnx.qcc.option.compiler.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.compiler.defines.1008023515" name="Defines (-D)" superClass="com.qnx.qcc.option.compiler.defines" valueType="definedSymbols">
|
||||
<listOptionValue builtIn="false" value="_FORTIFY_SOURCE=2"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.compiler.includePath.1142643875" name="Include Directories (-I)" superClass="com.qnx.qcc.option.compiler.includePath" valueType="includePath">
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/cocos2dx}""/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/usr/include/freetype2"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/usr/include"/>
|
||||
<listOptionValue builtIn="false" value="../../Classes"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/cocos2dx_support"/>
|
||||
<listOptionValue builtIn="false" value="../../../../"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/kazmath/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/blackberry"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/include"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/lua"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/tolua"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.compiler.616747785" superClass="com.qnx.qcc.inputType.compiler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.assembler.1686811724" name="QCC Assembler" superClass="com.qnx.qcc.tool.assembler">
|
||||
<option id="com.qnx.qcc.option.assembler.debug.2086702984" name="Debug (-g)" superClass="com.qnx.qcc.option.assembler.debug" value="true" valueType="boolean"/>
|
||||
<inputType id="com.qnx.qcc.inputType.assembler.111630752" superClass="com.qnx.qcc.inputType.assembler"/>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.linker.35285082" name="QCC Linker" superClass="com.qnx.qcc.tool.linker">
|
||||
<option id="com.qnx.qcc.option.linker.debug.1514682747" name="Debug (-g)" superClass="com.qnx.qcc.option.linker.debug" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.coverage.1881413807" name="Build for Code Coverage (-ftest-coverage -fprofile-arcs -p)" superClass="com.qnx.qcc.option.linker.coverage" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.langcpp.769428310" name="C++ (-lang-c++)" superClass="com.qnx.qcc.option.linker.langcpp" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraries.1325336223" name="Libraries (-l)" superClass="com.qnx.qcc.option.linker.libraries" valueType="libs">
|
||||
<listOptionValue builtIn="false" value="CocosDenshion"/>
|
||||
<listOptionValue builtIn="false" value="cocos2dx"/>
|
||||
<listOptionValue builtIn="false" value="EGL"/>
|
||||
<listOptionValue builtIn="false" value="GLESv2"/>
|
||||
<listOptionValue builtIn="false" value="bps"/>
|
||||
<listOptionValue builtIn="false" value="curl"/>
|
||||
<listOptionValue builtIn="false" value="grskia"/>
|
||||
<listOptionValue builtIn="false" value="xml2"/>
|
||||
<listOptionValue builtIn="false" value="tiff"/>
|
||||
<listOptionValue builtIn="false" value="jpeg"/>
|
||||
<listOptionValue builtIn="false" value="png"/>
|
||||
<listOptionValue builtIn="false" value="screen"/>
|
||||
<listOptionValue builtIn="false" value="alut"/>
|
||||
<listOptionValue builtIn="false" value="OpenAL"/>
|
||||
<listOptionValue builtIn="false" value="asound"/>
|
||||
<listOptionValue builtIn="false" value="m"/>
|
||||
<listOptionValue builtIn="false" value="z"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.security.2136296969" name="Enhanced Security (-Wl,-z,relro -Wl,-z,now)" superClass="com.qnx.qcc.option.linker.security" value="true" valueType="boolean"/>
|
||||
<option id="com.qnx.qcc.option.linker.libraryPaths.1115848281" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.259366688" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}/libcocos2dx.a"/>
|
||||
<listOptionValue builtIn="false" value="../../../../scripting/lua/proj.blackberry/${ConfigName}/liblua.a"/>
|
||||
</option>
|
||||
<inputType id="com.qnx.qcc.inputType.linker.780133405" superClass="com.qnx.qcc.inputType.linker">
|
||||
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||
<additionalInput kind="additionaldependency" paths="$(LIB_DEPS)"/>
|
||||
</inputType>
|
||||
</tool>
|
||||
<tool id="com.qnx.qcc.tool.archiver.2108749298" name="QCC Archiver" superClass="com.qnx.qcc.tool.archiver"/>
|
||||
</toolChain>
|
||||
</folderInfo>
|
||||
<sourceEntries>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="Classes"/>
|
||||
<entry flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name="cocos2dx_support"/>
|
||||
<entry excluding="Classes" flags="VALUE_WORKSPACE_PATH" kind="sourcePath" name=""/>
|
||||
</sourceEntries>
|
||||
</configuration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||
</cconfiguration>
|
||||
</storageModule>
|
||||
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||
<project id="HelloLua.null.1273913276" name="HelloLua"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="com.qnx.tools.ide.qde.core.QNXProjectProperties"/>
|
||||
<storageModule moduleId="refreshScope" versionNumber="1">
|
||||
<resource resourceType="PROJECT" workspacePath="/HelloLua"/>
|
||||
</storageModule>
|
||||
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||
<storageModule moduleId="scannerConfiguration">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.1761000041">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.coverage.181538713">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.debug.660208940">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.coverage.1771167181">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.profile.1237484173">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.debug.446234419">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
<scannerConfigBuildInfo instanceId="com.qnx.qcc.configuration.exe.release.1265921422">
|
||||
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId="com.qnx.tools.ide.qde.managedbuilder.core.qccScannerInfo"/>
|
||||
</scannerConfigBuildInfo>
|
||||
</storageModule>
|
||||
</cproject>
|
|
@ -0,0 +1,97 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>HelloLua</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
<project>cocos2dx</project>
|
||||
<project>CocosDenshion</project>
|
||||
<project>lua</project>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||
<triggers>clean,full,incremental,</triggers>
|
||||
<arguments>
|
||||
<dictionary>
|
||||
<key>?name?</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.append_environment</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildArguments</key>
|
||||
<value></value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildCommand</key>
|
||||
<value>make</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.buildLocation</key>
|
||||
<value>${workspace_loc:/HelloLua/Device-Debug}</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.contents</key>
|
||||
<value>org.eclipse.cdt.make.core.activeConfigSettings</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableAutoBuild</key>
|
||||
<value>false</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableCleanBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.enableFullBuild</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.stopOnError</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
<dictionary>
|
||||
<key>org.eclipse.cdt.make.core.useDefaultBuildCmd</key>
|
||||
<value>true</value>
|
||||
</dictionary>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||
<triggers>full,incremental,</triggers>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.qnx.tools.bbt.xml.core.bbtXMLValidationBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||
<nature>com.qnx.tools.ide.bbt.core.bbtnature</nature>
|
||||
<nature>org.eclipse.cdt.core.ccnature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>Classes</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Classes</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>Resources</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-1-PROJECT_LOC/Resources</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>cocos2dx_support</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/scripting/lua/cocos2dx_support</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
|
@ -0,0 +1,132 @@
|
|||
<?xml version="1.0" encoding="utf-8" standalone="no"?>
|
||||
<qnx xmlns="http://www.qnx.com/schemas/application/1.0">
|
||||
|
||||
<!-- BlackBerry Tablet OS application descriptor file.
|
||||
|
||||
Specifies parameters for identifying, installing, and launching native applications on BlackBerry Tablet OS.
|
||||
|
||||
-->
|
||||
|
||||
<!-- A universally unique application identifier. Must be unique across all BlackBerry Tablet OS applications.
|
||||
Using a reverse DNS-style name as the id is recommended. (Eg. com.example.ExampleApplication.) Required. -->
|
||||
<id>com.example.HelloLua</id>
|
||||
|
||||
<!-- The name that is displayed in the BlackBerry Tablet OS application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
<name>HelloLua</name>
|
||||
|
||||
<!-- A string value of the format <0-999>.<0-999>.<0-999> that represents application version which can be used to check for application upgrade.
|
||||
Values can also be 1-part or 2-part. It is not necessary to have a 3-part value.
|
||||
An updated version of application must have a versionNumber value higher than the previous version. Required. -->
|
||||
<versionNumber>1.0.0</versionNumber>
|
||||
|
||||
<!-- Fourth digit segment of the package version. First three segments are taken from the
|
||||
<versionNumber> element. Must be an integer from 0 to 2^16-1 -->
|
||||
<buildId>1</buildId>
|
||||
|
||||
<!-- A string value (such as "v1", "2.5", or "Alpha 1") that represents the version of the application, as it should be shown to users. Optional. -->
|
||||
<!-- <versionLabel></versionLabel> -->
|
||||
|
||||
<!-- Description, displayed in the BlackBerry Tablet OS application installer.
|
||||
May have multiple values for each language. See samples or xsd schema file. Optional. -->
|
||||
<description>The HelloLua application</description>
|
||||
|
||||
<!-- Copyright information. Optional. -->
|
||||
<!-- <copyright></copyright> -->
|
||||
|
||||
<!-- Name of author which is used for signing. Must match the developer name of your development certificate. -->
|
||||
<author>Example Inc.</author>
|
||||
<icon>
|
||||
<image>icon.png</image>
|
||||
</icon>
|
||||
|
||||
<!-- Unique author ID assigned by signing authority. Required if using debug tokens. -->
|
||||
<!-- <authorId>ABC1234YjsnUk235h</authorId> -->
|
||||
|
||||
<initialWindow>
|
||||
<systemChrome>none</systemChrome>
|
||||
<transparent>false</transparent>
|
||||
</initialWindow>
|
||||
|
||||
<!-- The category where the application appears. Either core.games or core.media. -->
|
||||
<category>core.games</category>
|
||||
<asset path="icon.png">icon.png</asset>
|
||||
|
||||
<!-- the variable 'worksparce_loc' is not supported in bbndk2.0, so we create an empty folder to make the relative path work. -->
|
||||
<asset path="../Resources">Resources</asset>
|
||||
|
||||
<!-- the path of the three shared libraries as follows in bbndk2.0 is different from bbndk1.0, so if the version of bbndk you use is 1.0, just uncomment the next three lines and comment the following three lines-->
|
||||
|
||||
<!-- used for bbndk1.0 -->
|
||||
<!--<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libbps.so" type="Qnx/Elf">lib/libbps.so.1</asset>-->
|
||||
<!--<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libOpenAL.so" type="Qnx/Elf">lib/libOpenAL.so.1</asset>-->
|
||||
<!--<asset path="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib/libalut.so" type="Qnx/Elf">lib/libalut.so.1</asset>-->
|
||||
|
||||
<!-- used for bbndk2.0 -->
|
||||
|
||||
<configuration id="com.qnx.qcc.configuration.exe.debug.446234419" name="Device-Debug">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/armle-v7/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Device-Debug/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Device-Debug/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.release.1265921422" name="Device-Release">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/armle-v7/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Device-Release/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Device-Release/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.1761000041" name="Device-Profile">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/armle-v7/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Device-Profile/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Device-Profile/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.1771167181" name="Device-Coverage">
|
||||
<platformArchitecture>armle-v7</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/armle-v7/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Device-Coverage/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Device-Coverage/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.debug.660208940" name="Simulator">
|
||||
<platformArchitecture>x86</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/x86/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Simulator/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Simulator/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.1237484173" name="Simulator-Profile">
|
||||
<platformArchitecture>x86</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/x86/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Simulator-Profile/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Simulator-Profile/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
<configuration id="com.qnx.qcc.configuration.exe.profile.coverage.181538713" name="Simulator-Coverage">
|
||||
<platformArchitecture>x86</platformArchitecture>
|
||||
<asset path="empty/../../../../cocos2dx/platform/third_party/blackberry/libraries/x86/libgrskia.so" type="Qnx/Elf">lib/libgrskia.so</asset>
|
||||
<asset path="empty/../../../../CocosDenshion/proj.blackberry/Simulator-Coverage/libCocosDenshion.so" type="Qnx/Elf">lib/libCocosDenshion.so</asset>
|
||||
<asset path="Simulator-Coverage/HelloLua" entry="true" type="Qnx/Elf">HelloLua</asset>
|
||||
</configuration>
|
||||
|
||||
<!-- The icon for the application, which should be 86x86. -->
|
||||
|
||||
<!-- The splash screen that will appear when your application is launching. Should be 1024x600. -->
|
||||
<!-- <splashscreen></splashscreen> -->
|
||||
|
||||
<!-- Request permission to execute native code. Required for native applications. -->
|
||||
<action system="true">run_native</action>
|
||||
|
||||
<!-- The permissions requested by your application. -->
|
||||
<!-- <action>access_shared</action> -->
|
||||
<!-- <action>record_audio</action> -->
|
||||
<!-- <action>read_geolocation</action> -->
|
||||
<!-- <action>use_camera</action> -->
|
||||
<!-- <action>access_internet</action> -->
|
||||
<!-- <action>play_audio</action> -->
|
||||
<!-- <action>post_notification</action> -->
|
||||
<!-- <action>set_audio_volume</action> -->
|
||||
<!-- <action>read_device_identifying_information</action> -->
|
||||
|
||||
<!-- Ensure that shared libraries in the package are found at run-time. -->
|
||||
<env var="LD_LIBRARY_PATH" value="app/native/lib"/>
|
||||
|
||||
</qnx>
|
|
@ -0,0 +1,34 @@
|
|||
|
||||
#include "../Classes/AppDelegate.h"
|
||||
#include "cocos2d.h"
|
||||
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
|
||||
int width, height;
|
||||
const char *width_str, *height_str;
|
||||
width_str = getenv("WIDTH");
|
||||
height_str = getenv("HEIGHT");
|
||||
if (width_str && height_str)
|
||||
{
|
||||
width = atoi(width_str);
|
||||
height = atoi(height_str);
|
||||
}
|
||||
else
|
||||
{
|
||||
width = 1024;
|
||||
height = 600;
|
||||
}
|
||||
|
||||
CCApplication::sharedApplication()->setResourceRootPath("app/native/Resources/");
|
||||
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView->setFrameSize(width, height);
|
||||
|
||||
return CCApplication::sharedApplication()->run();
|
||||
}
|
|
@ -50,6 +50,7 @@ Classes/ExtensionsTest/CocosBuilderTest/TestHeader/TestHeaderLayer.cpp \
|
|||
Classes/ExtensionsTest/CocosBuilderTest/ButtonTest/ButtonTestLayer.cpp \
|
||||
Classes/ExtensionsTest/CocosBuilderTest/MenuTest/MenuTestLayer.cpp \
|
||||
Classes/ExtensionsTest/NetworkTest/HttpClientTest.cpp \
|
||||
Classes/ExtensionsTest/EditBoxTest/EditBoxTest.cpp \
|
||||
Classes/FontTest/FontTest.cpp \
|
||||
Classes/IntervalTest/IntervalTest.cpp \
|
||||
Classes/KeypadTest/KeypadTest.cpp \
|
||||
|
|
|
@ -22,8 +22,32 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
|
||||
|
||||
// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
|
||||
// pDirector->enableRetinaDisplay(true);
|
||||
TargetPlatform target = getTargetPlatform();
|
||||
|
||||
if (target == kTargetIpad)
|
||||
{
|
||||
// ipad
|
||||
|
||||
if (pDirector->enableRetinaDisplay(true))
|
||||
{
|
||||
// ipad hd
|
||||
CCFileUtils::sharedFileUtils()->setResourceDirectory("ipadhd");
|
||||
}
|
||||
else
|
||||
{
|
||||
CCFileUtils::sharedFileUtils()->setResourceDirectory("ipad");
|
||||
}
|
||||
}
|
||||
else if (target == kTargetIphone)
|
||||
{
|
||||
// iphone
|
||||
|
||||
if (pDirector->enableRetinaDisplay(true))
|
||||
{
|
||||
// iphone hd
|
||||
CCFileUtils::sharedFileUtils()->setResourceDirectory("hd");
|
||||
}
|
||||
}
|
||||
|
||||
// turn on display FPS
|
||||
pDirector->setDisplayStats(true);
|
||||
|
|
|
@ -33,7 +33,7 @@ EditBoxTest::EditBoxTest()
|
|||
menuBack->setPosition(CCPointZero);
|
||||
addChild(menuBack);
|
||||
|
||||
CCSize editBoxSize = CCSizeMake(visibleSize.width/3, visibleSize.height/8);
|
||||
CCSize editBoxSize = CCSizeMake(visibleSize.width - 100, 60);
|
||||
|
||||
// top
|
||||
m_pEditName = CCEditBox::create(editBoxSize, CCScale9Sprite::create("extensions/green_edit.png"));
|
||||
|
@ -57,7 +57,7 @@ EditBoxTest::EditBoxTest()
|
|||
addChild(m_pEditPassword);
|
||||
|
||||
// bottom
|
||||
m_pEditEmail = CCEditBox::create(CCSizeMake(editBoxSize.width+100, editBoxSize.height), CCScale9Sprite::create("extensions/yellow_edit.png"));
|
||||
m_pEditEmail = CCEditBox::create(CCSizeMake(editBoxSize.width, editBoxSize.height), CCScale9Sprite::create("extensions/yellow_edit.png"));
|
||||
m_pEditEmail->setPosition(ccp(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/4));
|
||||
m_pEditEmail->setPlaceHolder("Email:");
|
||||
m_pEditEmail->setInputMode(kEditBoxInputModeEmailAddr);
|
||||
|
|
|
@ -4,7 +4,7 @@
|
|||
#include "ControlExtensionTest/CCControlSceneManager.h"
|
||||
#include "CocosBuilderTest/CocosBuilderTest.h"
|
||||
#include "NetworkTest/HttpClientTest.h"
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
#include "EditBoxTest/EditBoxTest.h"
|
||||
#endif
|
||||
|
||||
|
@ -20,7 +20,7 @@ enum
|
|||
TEST_CCCONTROLBUTTON,
|
||||
TEST_COCOSBUILDER,
|
||||
TEST_HTTPCLIENT,
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
TEST_EDITBOX,
|
||||
#endif
|
||||
TEST_MAX_COUNT,
|
||||
|
@ -32,7 +32,7 @@ static const std::string testsName[TEST_MAX_COUNT] =
|
|||
"CCControlButtonTest",
|
||||
"CocosBuilderTest",
|
||||
"HttpClientTest",
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
"EditBoxTest"
|
||||
#endif
|
||||
};
|
||||
|
@ -97,7 +97,7 @@ void ExtensionsMainLayer::menuCallback(CCObject* pSender)
|
|||
runHttpClientTest();
|
||||
}
|
||||
break;
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS)
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
case TEST_EDITBOX:
|
||||
{
|
||||
runEditBoxTest();
|
||||
|
|
|
@ -0,0 +1 @@
|
|||
a6ca8414e453957fa2fbc456b47160ac402ea35e
|
|
@ -37,7 +37,6 @@ import android.widget.FrameLayout;
|
|||
import android.view.ViewGroup;
|
||||
|
||||
public class TestCpp extends Cocos2dxActivity{
|
||||
private Cocos2dxGLSurfaceView mGLView;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
|
@ -167,9 +167,9 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.1976822869" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.597387014" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../extensions/proj.blackberry/${ConfigName}/libextensions.a"/>
|
||||
|
@ -264,9 +264,9 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.1615583479" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1434184051" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../extensions/proj.blackberry/${ConfigName}/libextensions.a"/>
|
||||
|
@ -361,9 +361,9 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.172097509" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1287776919" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../extensions/proj.blackberry/${ConfigName}/libextensions.a"/>
|
||||
|
@ -456,9 +456,9 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.880489672" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.1867792515" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../extensions/proj.blackberry/${ConfigName}/libextensions.a"/>
|
||||
|
@ -552,9 +552,9 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.1204179500" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.653674459" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../extensions/proj.blackberry/${ConfigName}/libextensions.a"/>
|
||||
|
@ -648,9 +648,9 @@
|
|||
<option id="com.qnx.qcc.option.linker.libraryPaths.1949291872" name="Library Paths (-L)" superClass="com.qnx.qcc.option.linker.libraryPaths" valueType="libPaths">
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/lib"/>
|
||||
<listOptionValue builtIn="false" value="${QNX_TARGET}/../target-override/${CPUVARDIR}/usr/lib"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../CocosDenshion/proj.blackberry/${ConfigName}"/>
|
||||
<listOptionValue builtIn="false" value="../../../../cocos2dx/platform/third_party/blackberry/libraries/${CPUVARDIR}"/>
|
||||
</option>
|
||||
<option id="com.qnx.qcc.option.linker.ldoptions.2020635567" name="Linker Options (-Wl,)" superClass="com.qnx.qcc.option.linker.ldoptions" valueType="stringList">
|
||||
<listOptionValue builtIn="false" value="../../../../extensions/proj.blackberry/${ConfigName}/libextensions.a"/>
|
||||
|
|
|
@ -1 +1 @@
|
|||
9dc4229a0e1a4577d300081dc8e3abc2a1e2f1f2
|
||||
13fb5118be504c0cb162fe003715353d23316944
|
|
@ -1 +1 @@
|
|||
756534a58c37d049b7033828eccf2ec0fb0a221a
|
||||
dbcfed31d505836a286d749e72f74276b36a50e7
|
|
@ -37,7 +37,6 @@ import android.view.ViewGroup;
|
|||
import android.widget.FrameLayout;
|
||||
|
||||
public class TestJavascript extends Cocos2dxActivity{
|
||||
private Cocos2dxGLSurfaceView mGLView;
|
||||
|
||||
protected void onCreate(Bundle savedInstanceState){
|
||||
super.onCreate(savedInstanceState);
|
||||
|
|
|
@ -0,0 +1,67 @@
|
|||
#include "cocos2d.h"
|
||||
#include "CCEGLView.h"
|
||||
#include "AppDelegate.h"
|
||||
#include "CCLuaEngine.h"
|
||||
#include "SimpleAudioEngine.h"
|
||||
|
||||
using namespace CocosDenshion;
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
AppDelegate::AppDelegate()
|
||||
{
|
||||
}
|
||||
|
||||
AppDelegate::~AppDelegate()
|
||||
{
|
||||
SimpleAudioEngine::end();
|
||||
}
|
||||
|
||||
bool AppDelegate::applicationDidFinishLaunching()
|
||||
{
|
||||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
|
||||
|
||||
// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
|
||||
// pDirector->enableRetinaDisplay(true);
|
||||
|
||||
// turn on display FPS
|
||||
pDirector->setDisplayStats(true);
|
||||
|
||||
// set FPS. the default value is 1.0/60 if you don't call this
|
||||
pDirector->setAnimationInterval(1.0 / 60);
|
||||
|
||||
// register lua engine
|
||||
CCScriptEngineProtocol* pEngine = CCLuaEngine::engine();
|
||||
CCScriptEngineManager::sharedManager()->setScriptEngine(pEngine);
|
||||
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_ANDROID)
|
||||
CCString* pstrFileContent = CCString::createWithContentsOfFile("luaScript/controller.lua");
|
||||
if (pstrFileContent)
|
||||
{
|
||||
pEngine->executeString(pstrFileContent->getCString());
|
||||
}
|
||||
#else
|
||||
std::string path = CCFileUtils::sharedFileUtils()->fullPathFromRelativePath("luaScript/controller.lua");
|
||||
pEngine->addSearchPath(path.substr(0, path.find_last_of("/")).c_str());
|
||||
pEngine->executeScriptFile(path.c_str());
|
||||
#endif
|
||||
return true;
|
||||
}
|
||||
|
||||
// This function will be called when the app is inactive. When comes a phone call,it's be invoked too
|
||||
void AppDelegate::applicationDidEnterBackground()
|
||||
{
|
||||
CCDirector::sharedDirector()->stopAnimation();
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->pauseBackgroundMusic();
|
||||
}
|
||||
|
||||
// this function will be called when the app is active again
|
||||
void AppDelegate::applicationWillEnterForeground()
|
||||
{
|
||||
CCDirector::sharedDirector()->startAnimation();
|
||||
|
||||
SimpleAudioEngine::sharedEngine()->resumeBackgroundMusic();
|
||||
}
|
|
@ -0,0 +1,38 @@
|
|||
#ifndef __APP_DELEGATE_H__
|
||||
#define __APP_DELEGATE_H__
|
||||
|
||||
#include "cocos2d.h"
|
||||
|
||||
/**
|
||||
@brief The cocos2d Application.
|
||||
|
||||
The reason for implement as private inheritance is to hide some interface call by CCDirector.
|
||||
*/
|
||||
class AppDelegate : private cocos2d::CCApplication
|
||||
{
|
||||
public:
|
||||
AppDelegate();
|
||||
virtual ~AppDelegate();
|
||||
|
||||
/**
|
||||
@brief Implement CCDirector and CCScene init code here.
|
||||
@return true Initialize success, app continue.
|
||||
@return false Initialize failed, app terminate.
|
||||
*/
|
||||
virtual bool applicationDidFinishLaunching();
|
||||
|
||||
/**
|
||||
@brief The function be called when the application enter background
|
||||
@param the pointer of the application
|
||||
*/
|
||||
virtual void applicationDidEnterBackground();
|
||||
|
||||
/**
|
||||
@brief The function be called when the application enter foreground
|
||||
@param the pointer of the application
|
||||
*/
|
||||
virtual void applicationWillEnterForeground();
|
||||
};
|
||||
|
||||
#endif // __APP_DELEGATE_H__
|
||||
|
|
@ -0,0 +1,397 @@
|
|||
|
||||
local SceneIdx = -1
|
||||
local MAX_LAYER = 7
|
||||
local s = CCDirector:sharedDirector():getWinSize()
|
||||
|
||||
local function initWithLayer(layer)
|
||||
titleLabel = CCLabelTTF:create("ActionsProgressTest", "Arial", 18)
|
||||
layer:addChild(titleLabel, 1)
|
||||
titleLabel:setPosition(CCPointMake(s.width / 2, s.height - 50))
|
||||
|
||||
subtitleLabel = CCLabelTTF:create("", "Thonburi", 22)
|
||||
layer:addChild(subtitleLabel, 1)
|
||||
subtitleLabel:setPosition( CCPointMake(s.width / 2, s.height - 80))
|
||||
|
||||
-- menu
|
||||
local item1 = CCMenuItemImage:create(s_pPathB1, s_pPathB2)
|
||||
local item2 = CCMenuItemImage:create(s_pPathR1, s_pPathR2)
|
||||
local item3 = CCMenuItemImage:create(s_pPathF1, s_pPathF2)
|
||||
item1:registerScriptHandler(backCallback)
|
||||
item2:registerScriptHandler(restartCallback)
|
||||
item3:registerScriptHandler(nextCallback)
|
||||
|
||||
local menu = CCMenu:create()
|
||||
menu:addChild(item1)
|
||||
menu:addChild(item2)
|
||||
menu:addChild(item3)
|
||||
menu:setPosition(CCPointMake(0, 0))
|
||||
item1:setPosition(CCPointMake(s.width / 2 - item2:getContentSize().width * 2, item2:getContentSize().height / 2))
|
||||
item2:setPosition(CCPointMake(s.width / 2, item2:getContentSize().height / 2))
|
||||
item3:setPosition(CCPointMake(s.width / 2 + item2:getContentSize().width * 2, item2:getContentSize().height / 2))
|
||||
layer:addChild(menu, 1)
|
||||
|
||||
local background = CCLayerColor:create(ccc4(255,0,0,255))
|
||||
layer:addChild(background, -10)
|
||||
end
|
||||
|
||||
local function nextAction()
|
||||
SceneIdx = SceneIdx + 1
|
||||
SceneIdx = math.mod(SceneIdx, MAX_LAYER)
|
||||
return CreateActionProgressLayer(SceneIdx)
|
||||
end
|
||||
|
||||
local function restartAction()
|
||||
return CreateActionProgressLayer(SceneIdx)
|
||||
end
|
||||
|
||||
local function backAction()
|
||||
SceneIdx = SceneIdx - 1
|
||||
if SceneIdx < 0 then
|
||||
SceneIdx = SceneIdx + MAX_LAYER
|
||||
end
|
||||
return CreateActionProgressLayer(SceneIdx)
|
||||
end
|
||||
|
||||
local function nextCallback()
|
||||
local scene = CCScene:create()
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(nextAction())
|
||||
|
||||
CCDirector:sharedDirector():replaceScene(scene)
|
||||
end
|
||||
|
||||
local function restartCallback()
|
||||
local scene = CCScene:create()
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(restartAction())
|
||||
|
||||
CCDirector:sharedDirector():replaceScene(scene)
|
||||
end
|
||||
|
||||
local function backCallback()
|
||||
local scene = CCScene:create()
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(backAction())
|
||||
|
||||
CCDirector:sharedDirector():replaceScene(scene)
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressToRadial
|
||||
------------------------------------
|
||||
local function SpriteProgressToRadial()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local to1 = CCProgressTo:create(2, 100)
|
||||
local to2 = CCProgressTo:create(2, 100)
|
||||
|
||||
local left = CCProgressTimer:create(CCSprite:create(s_pPathSister1))
|
||||
left:setType(kCCProgressTimerTypeRadial)
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(to1))
|
||||
layer:addChild(left)
|
||||
|
||||
local right = CCProgressTimer:create(CCSprite:create(s_pPathBlock))
|
||||
right:setType(kCCProgressTimerTypeRadial)
|
||||
-- Makes the ridial CCW
|
||||
right:setReverseProgress(true)
|
||||
right:setPosition(CCPointMake(s.width - 100, s.height / 2))
|
||||
right:runAction(CCRepeatForever:create(to2))
|
||||
layer:addChild(right)
|
||||
|
||||
subtitleLabel:setString("ProgressTo Radial")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressToHorizontal
|
||||
------------------------------------
|
||||
local function SpriteProgressToHorizontal()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local to1 = CCProgressTo:create(2, 100)
|
||||
local to2 = CCProgressTo:create(2, 100)
|
||||
|
||||
local left = CCProgressTimer:create(CCSprite:create(s_pPathSister1))
|
||||
left:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the left since the midpoint is 0 for the x
|
||||
left:setMidpoint(CCPointMake(0, 0))
|
||||
-- Setup for a horizontal bar since the bar change rate is 0 for y meaning no vertical change
|
||||
left:setBarChangeRate(CCPointMake(1, 0))
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(to1))
|
||||
layer:addChild(left)
|
||||
|
||||
local right = CCProgressTimer:create(CCSprite:create(s_pPathSister2))
|
||||
right:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the left since the midpoint is 1 for the x
|
||||
right:setMidpoint(CCPointMake(1, 0))
|
||||
-- Setup for a horizontal bar since the bar change rate is 0 for y meaning no vertical change
|
||||
right:setBarChangeRate(CCPointMake(1, 0))
|
||||
right:setPosition(CCPointMake(s.width - 100, s.height / 2))
|
||||
right:runAction(CCRepeatForever:create(to2))
|
||||
layer:addChild(right)
|
||||
|
||||
subtitleLabel:setString("ProgressTo Horizontal")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressToVertical
|
||||
------------------------------------
|
||||
local function SpriteProgressToVertical()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local to1 = CCProgressTo:create(2, 100)
|
||||
local to2 = CCProgressTo:create(2, 100)
|
||||
|
||||
local left = CCProgressTimer:create(CCSprite:create(s_pPathSister1))
|
||||
left:setType(kCCProgressTimerTypeBar)
|
||||
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
left:setMidpoint(CCPointMake(0,0))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
left:setBarChangeRate(CCPointMake(0, 1))
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(to1))
|
||||
layer:addChild(left)
|
||||
|
||||
local right = CCProgressTimer:create(CCSprite:create(s_pPathSister2))
|
||||
right:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
right:setMidpoint(CCPointMake(0, 1))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
right:setBarChangeRate(CCPointMake(0, 1))
|
||||
right:setPosition(CCPointMake(s.width - 100, s.height / 2))
|
||||
right:runAction(CCRepeatForever:create(to2))
|
||||
layer:addChild(right)
|
||||
|
||||
subtitleLabel:setString("ProgressTo Vertical")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressToRadialMidpointChanged
|
||||
------------------------------------
|
||||
local function SpriteProgressToRadialMidpointChanged()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local action = CCProgressTo:create(2, 100)
|
||||
|
||||
-- Our image on the left should be a radial progress indicator, clockwise
|
||||
local left = CCProgressTimer:create(CCSprite:create(s_pPathBlock))
|
||||
left:setType(kCCProgressTimerTypeRadial)
|
||||
left:setMidpoint(CCPointMake(0.25, 0.75))
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(action:copy():autorelease()))
|
||||
layer:addChild(left)
|
||||
|
||||
-- Our image on the left should be a radial progress indicator, counter clockwise
|
||||
local right = CCProgressTimer:create(CCSprite:create(s_pPathBlock))
|
||||
right:setType(kCCProgressTimerTypeRadial)
|
||||
right:setMidpoint(CCPointMake(0.75, 0.25))
|
||||
|
||||
--[[
|
||||
Note the reverse property (default=NO) is only added to the right image. That's how
|
||||
we get a counter clockwise progress.
|
||||
]]
|
||||
right:setPosition(CCPointMake(s.width - 100, s.height / 2))
|
||||
right:runAction(CCRepeatForever:create(action:copy():autorelease()))
|
||||
layer:addChild(right)
|
||||
|
||||
subtitleLabel:setString("Radial w/ Different Midpoints")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressBarVarious
|
||||
------------------------------------
|
||||
local function SpriteProgressBarVarious()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local to = CCProgressTo:create(2, 100)
|
||||
|
||||
local left = CCProgressTimer:create(CCSprite:create(s_pPathSister1))
|
||||
left:setType(kCCProgressTimerTypeBar)
|
||||
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
left:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
left:setBarChangeRate(CCPointMake(1, 0))
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
layer:addChild(left)
|
||||
|
||||
local middle = CCProgressTimer:create(CCSprite:create(s_pPathSister2))
|
||||
middle:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
middle:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
middle:setBarChangeRate(CCPointMake(1, 1))
|
||||
middle:setPosition(CCPointMake(s.width/2, s.height/2))
|
||||
middle:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
layer:addChild(middle)
|
||||
|
||||
local right = CCProgressTimer:create(CCSprite:create(s_pPathSister2))
|
||||
right:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
right:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
right:setBarChangeRate(CCPointMake(0, 1))
|
||||
right:setPosition(CCPointMake(s.width-100, s.height/2))
|
||||
right:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
layer:addChild(right)
|
||||
|
||||
subtitleLabel:setString("ProgressTo Bar Mid")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressBarTintAndFade
|
||||
------------------------------------
|
||||
local function SpriteProgressBarTintAndFade()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local to = CCProgressTo:create(6, 100)
|
||||
local array = CCArray:create()
|
||||
array:addObject(CCTintTo:create(1, 255, 0, 0))
|
||||
array:addObject(CCTintTo:create(1, 0, 255, 0))
|
||||
array:addObject(CCTintTo:create(1, 0, 0, 255))
|
||||
local tint = CCSequence:create(array)
|
||||
local fade = CCSequence:createWithTwoActions(
|
||||
CCFadeTo:create(1.0, 0),
|
||||
CCFadeTo:create(1.0, 255))
|
||||
|
||||
local left = CCProgressTimer:create(CCSprite:create(s_pPathSister1))
|
||||
left:setType(kCCProgressTimerTypeBar)
|
||||
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
left:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
left:setBarChangeRate(CCPointMake(1, 0))
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
left:runAction(CCRepeatForever:create(tint:copy():autorelease()))
|
||||
layer:addChild(left)
|
||||
|
||||
left:addChild(CCLabelTTF:create("Tint", "Marker Felt", 20.0))
|
||||
|
||||
local middle = CCProgressTimer:create(CCSprite:create(s_pPathSister2))
|
||||
middle:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
middle:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
middle:setBarChangeRate(CCPointMake(1, 1))
|
||||
middle:setPosition(CCPointMake(s.width / 2, s.height / 2))
|
||||
middle:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
middle:runAction(CCRepeatForever:create(fade:copy():autorelease()))
|
||||
layer:addChild(middle)
|
||||
|
||||
middle:addChild(CCLabelTTF:create("Fade", "Marker Felt", 20.0))
|
||||
|
||||
local right = CCProgressTimer:create(CCSprite:create(s_pPathSister2))
|
||||
right:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
right:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
right:setBarChangeRate(CCPointMake(0, 1))
|
||||
right:setPosition(CCPointMake(s.width - 100, s.height / 2))
|
||||
right:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
right:runAction(CCRepeatForever:create(tint:copy():autorelease()))
|
||||
right:runAction(CCRepeatForever:create(fade:copy():autorelease()))
|
||||
layer:addChild(right)
|
||||
|
||||
right:addChild(CCLabelTTF:create("Tint and Fade", "Marker Felt", 20.0))
|
||||
|
||||
subtitleLabel:setString("ProgressTo Bar Mid")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- SpriteProgressWithSpriteFrame
|
||||
------------------------------------
|
||||
local function SpriteProgressWithSpriteFrame()
|
||||
local layer = CCLayer:create()
|
||||
initWithLayer(layer)
|
||||
|
||||
local to = CCProgressTo:create(6, 100)
|
||||
|
||||
CCSpriteFrameCache:sharedSpriteFrameCache():addSpriteFramesWithFile("zwoptex/grossini.plist")
|
||||
|
||||
local left = CCProgressTimer:create(CCSprite:createWithSpriteFrameName("grossini_dance_01.png"))
|
||||
left:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
left:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
left:setBarChangeRate(CCPointMake(1, 0))
|
||||
left:setPosition(CCPointMake(100, s.height / 2))
|
||||
left:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
layer:addChild(left)
|
||||
|
||||
local middle = CCProgressTimer:create(CCSprite:createWithSpriteFrameName("grossini_dance_02.png"))
|
||||
middle:setType(kCCProgressTimerTypeBar)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
middle:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
middle:setBarChangeRate(CCPointMake(1, 1))
|
||||
middle:setPosition(CCPointMake(s.width / 2, s.height / 2))
|
||||
middle:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
layer:addChild(middle)
|
||||
|
||||
local right = CCProgressTimer:create(CCSprite:createWithSpriteFrameName("grossini_dance_03.png"))
|
||||
right:setType(kCCProgressTimerTypeRadial)
|
||||
-- Setup for a bar starting from the bottom since the midpoint is 0 for the y
|
||||
right:setMidpoint(CCPointMake(0.5, 0.5))
|
||||
-- Setup for a vertical bar since the bar change rate is 0 for x meaning no horizontal change
|
||||
right:setBarChangeRate(CCPointMake(0, 1))
|
||||
right:setPosition(CCPointMake(s.width - 100, s.height / 2))
|
||||
right:runAction(CCRepeatForever:create(to:copy():autorelease()))
|
||||
layer:addChild(right)
|
||||
|
||||
subtitleLabel:setString("Progress With Sprite Frame")
|
||||
return layer
|
||||
end
|
||||
|
||||
------------------------------------
|
||||
-- Entrance
|
||||
------------------------------------
|
||||
function CreateActionProgressLayer(index)
|
||||
local layer = nil
|
||||
|
||||
if index == 0 then
|
||||
layer = SpriteProgressToRadial()
|
||||
elseif index == 1 then
|
||||
layer = SpriteProgressToHorizontal()
|
||||
elseif index == 2 then
|
||||
layer = SpriteProgressToVertical()
|
||||
elseif index == 3 then
|
||||
layer = SpriteProgressToRadialMidpointChanged()
|
||||
elseif index == 4 then
|
||||
layer = SpriteProgressBarVarious()
|
||||
elseif index == 5 then
|
||||
layer = SpriteProgressBarTintAndFade()
|
||||
elseif index == 6 then
|
||||
layer = SpriteProgressWithSpriteFrame()
|
||||
end
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
function ProgressActionsTest()
|
||||
cclog("ProgressActionsTest")
|
||||
local scene = CCScene:create()
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(nextAction())
|
||||
|
||||
CCDirector:sharedDirector():replaceScene(scene)
|
||||
end
|
|
@ -0,0 +1,47 @@
|
|||
require "luaScript/helper"
|
||||
|
||||
|
||||
Action_Table =
|
||||
{
|
||||
"ACTION_MANUAL_LAYER",
|
||||
"ACTION_MOVE_LAYER",
|
||||
"ACTION_SCALE_LAYER",
|
||||
"ACTION_ROTATE_LAYER",
|
||||
"ACTION_SKEW_LAYER",
|
||||
"ACTION_SKEWROTATE_LAYER",
|
||||
"ACTION_JUMP_LAYER",
|
||||
"ACTION_CARDINALSPLINE_LAYER",
|
||||
"ACTION_CATMULLROM_LAYER",
|
||||
"ACTION_BEZIER_LAYER",
|
||||
"ACTION_BLINK_LAYER",
|
||||
"ACTION_FADE_LAYER",
|
||||
"ACTION_TINT_LAYER",
|
||||
"ACTION_ANIMATE_LAYER",
|
||||
"ACTION_SEQUENCE_LAYER",
|
||||
"ACTION_SEQUENCE2_LAYER",
|
||||
"ACTION_SPAWN_LAYER",
|
||||
"ACTION_REVERSE",
|
||||
"ACTION_DELAYTIME_LAYER",
|
||||
"ACTION_REPEAT_LAYER",
|
||||
"ACTION_REPEATEFOREVER_LAYER",
|
||||
"ACTION_ROTATETOREPEATE_LAYER",
|
||||
"ACTION_ROTATEJERK_LAYER",
|
||||
"ACTION_CALLFUNC_LAYER",
|
||||
-- problem: no corresponding function in CCLuaEngine yet
|
||||
-- "ACTION_CALLFUNCND_LAYER",
|
||||
"ACTION_REVERSESEQUENCE_LAYER",
|
||||
"ACTION_REVERSESEQUENCE2_LAYER",
|
||||
"ACTION_ORBIT_LAYER",
|
||||
"ACTION_FOLLOW_LAYER",
|
||||
"ACTION_TARGETED_LAYER",
|
||||
-- problem: schedule feature hasn't implement on lua yet
|
||||
-- "PAUSERESUMEACTIONS_LAYER",
|
||||
-- "ACTION_ISSUE1305_LAYER",
|
||||
"ACTION_ISSUE1305_2_LAYER",
|
||||
"ACTION_ISSUE1288_LAYER",
|
||||
"ACTION_ISSUE1288_2_LAYER",
|
||||
"ACTION_ISSUE1327_LAYER",
|
||||
"ACTION_LAYER_COUNT",
|
||||
}
|
||||
|
||||
Action_Table = CreateEnumTable(Action_Table)
|
File diff suppressed because it is too large
Load Diff
|
@ -0,0 +1,68 @@
|
|||
|
||||
local size = CCDirector:sharedDirector():getWinSize()
|
||||
local layer = nil
|
||||
local kTagSprite = 1
|
||||
|
||||
local function initWithLayer()
|
||||
local sprite = CCSprite:create(s_pPathGrossini)
|
||||
|
||||
local bgLayer = CCLayerColor:create(ccc4(255,255,0,255))
|
||||
layer:addChild(bgLayer, -1)
|
||||
|
||||
layer:addChild(sprite, 0, kTagSprite)
|
||||
sprite:setPosition(CCPointMake(20,150))
|
||||
|
||||
sprite:runAction(CCJumpTo:create(4, CCPointMake(300,48), 100, 4))
|
||||
|
||||
bgLayer:runAction(CCRepeatForever:create(CCSequence:createWithTwoActions(
|
||||
CCFadeIn:create(1),
|
||||
CCFadeOut:create(1))))
|
||||
|
||||
local function onTouchEnded(x, y)
|
||||
local s = layer:getChildByTag(kTagSprite)
|
||||
s:stopAllActions()
|
||||
s:runAction(CCMoveTo:create(1, CCPointMake(x, y)))
|
||||
local posX, posY = s:getPosition()
|
||||
local o = x - posX
|
||||
local a = y - posY
|
||||
local at = math.atan(o / a) / math.pi * 180.0
|
||||
|
||||
if a < 0 then
|
||||
if o < 0 then
|
||||
at = 180 + math.abs(at)
|
||||
else
|
||||
at = 180 - math.abs(at)
|
||||
end
|
||||
end
|
||||
s:runAction(CCRotateTo:create(1, at))
|
||||
end
|
||||
|
||||
local function onTouch(eventType, x, y)
|
||||
if eventType == CCTOUCHBEGAN then
|
||||
return true
|
||||
elseif eventType == CCTOUCHENDED then
|
||||
return onTouchEnded(x, y)
|
||||
end
|
||||
end
|
||||
|
||||
layer:setTouchEnabled(true)
|
||||
layer:registerScriptTouchHandler(onTouch)
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
--------------------------------
|
||||
-- Click And Move Test
|
||||
--------------------------------
|
||||
function ClickAndMoveTest()
|
||||
cclog("ClickAndMoveTest")
|
||||
local scene = CCScene:create()
|
||||
layer = CCLayer:create()
|
||||
|
||||
initWithLayer()
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(layer)
|
||||
|
||||
return scene
|
||||
end
|
|
@ -0,0 +1,26 @@
|
|||
|
||||
EffectsList =
|
||||
{
|
||||
[0] = "Shaky3D",
|
||||
"Waves3D",
|
||||
"FlipX3D",
|
||||
"FlipY3D",
|
||||
"Lens3D",
|
||||
"Ripple3D",
|
||||
"Liquid",
|
||||
"Waves",
|
||||
"Twirl",
|
||||
"ShakyTiles3D",
|
||||
"ShatteredTiles3D",
|
||||
"ShuffleTiles",
|
||||
"FadeOutTRTiles",
|
||||
"FadeOutBLTiles",
|
||||
"FadeOutUpTiles",
|
||||
"FadeOutDownTiles",
|
||||
"TurnOffTiles",
|
||||
"WavesTiles3D",
|
||||
"JumpTiles3D",
|
||||
"SplitRows",
|
||||
"SplitCols",
|
||||
"PageTurn3D",
|
||||
}
|
|
@ -0,0 +1,29 @@
|
|||
require "luaScript/EffectsTest/EffectsName"
|
||||
|
||||
|
||||
local ActionIdx = 0
|
||||
local size = CCDirector:sharedDirector():getWinSize()
|
||||
local kTagTextLayer = 1
|
||||
local kTagBackground = 1
|
||||
local kTagLabel = 2
|
||||
|
||||
function initWithLayer(layer)
|
||||
|
||||
end
|
||||
|
||||
|
||||
--------------------------------------
|
||||
-- Entrance
|
||||
--------------------------------------
|
||||
function EffectsTest()
|
||||
cclog("EffectsTest")
|
||||
local scene = CCScene:create()
|
||||
local layer = CCLayerColor:create(ccc4(32,128,32,255))
|
||||
|
||||
initWithLayer(layer)
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(layer)
|
||||
|
||||
return scene
|
||||
end
|
|
@ -0,0 +1,9 @@
|
|||
require "luaScript/helper"
|
||||
|
||||
|
||||
Particle_Table =
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
Particle_Table = CreateEnumTable(Particle_Table)
|
|
@ -0,0 +1,115 @@
|
|||
|
||||
local size = CCDirector:sharedDirector():getWinSize()
|
||||
|
||||
local function CreateSpriteLayer()
|
||||
local layer = CCLayer:create()
|
||||
|
||||
local x, y
|
||||
x = size.width
|
||||
y = size.height
|
||||
|
||||
local sprite = CCSprite:create(s_pPathGrossini)
|
||||
local spriteSister1 = CCSprite:create(s_pPathSister1)
|
||||
local spriteSister2 = CCSprite:create(s_pPathSister2)
|
||||
|
||||
sprite:setScale(1.5)
|
||||
spriteSister1:setScale(1.5)
|
||||
spriteSister2:setScale(1.5)
|
||||
|
||||
sprite:setPosition(CCPointMake(x / 2, y / 2))
|
||||
spriteSister1:setPosition(CCPointMake(40, y / 2))
|
||||
spriteSister2:setPosition(CCPointMake(x - 40, y / 2))
|
||||
|
||||
layer:addChild(sprite)
|
||||
layer:addChild(spriteSister1)
|
||||
layer:addChild(spriteSister2)
|
||||
|
||||
local rot = CCRotateBy:create(16, -3600)
|
||||
sprite:runAction(rot)
|
||||
|
||||
local jump1 = CCJumpBy:create(4, CCPointMake(-400, 0), 100, 4)
|
||||
local jump2 = jump1:reverse()
|
||||
|
||||
local rot1 = CCRotateBy:create(4, 360 * 2)
|
||||
local rot2 = rot1:reverse()
|
||||
|
||||
spriteSister1:runAction(CCRepeat:create(CCSequence:createWithTwoActions(jump2, jump1), 5))
|
||||
spriteSister2:runAction(CCRepeat:create(CCSequence:createWithTwoActions(jump1:copy():autorelease(), jump2:copy():autorelease()), 5))
|
||||
|
||||
spriteSister1:runAction(CCRepeat:create(CCSequence:createWithTwoActions(rot1, rot2), 5))
|
||||
spriteSister2:runAction(CCRepeat:create(CCSequence:createWithTwoActions(rot2:copy():autorelease(), rot1:copy():autorelease()), 5))
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
local function CreateTestLayer()
|
||||
local layer = CCLayer:create()
|
||||
|
||||
local x, y
|
||||
x = size.width
|
||||
y = size.height
|
||||
|
||||
local label = CCLabelTTF:create("cocos2d", "Tahoma", 64)
|
||||
label:setPosition(x / 2, y / 2)
|
||||
layer:addChild(label)
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
local function CreateRotateWorldLayer()
|
||||
local layer = CCLayer:create()
|
||||
|
||||
local x, y
|
||||
x = size.width
|
||||
y = size.height
|
||||
|
||||
local blue = CCLayerColor:create(ccc4(0,0,255,255))
|
||||
local red = CCLayerColor:create(ccc4(255,0,0,255))
|
||||
local green = CCLayerColor:create(ccc4(0,255,0,255))
|
||||
local white = CCLayerColor:create(ccc4(255,255,255,255))
|
||||
|
||||
blue:setScale(0.5)
|
||||
blue:setPosition(CCPointMake(- x / 4, - y / 4))
|
||||
blue:addChild(CreateSpriteLayer())
|
||||
|
||||
red:setScale(0.5)
|
||||
red:setPosition(CCPointMake(x / 4, - y / 4))
|
||||
|
||||
green:setScale(0.5)
|
||||
green:setPosition(CCPointMake(- x / 4, y / 4))
|
||||
green:addChild(CreateTestLayer())
|
||||
|
||||
white:setScale(0.5)
|
||||
white:setPosition(CCPointMake(x / 4, y / 4))
|
||||
white:ignoreAnchorPointForPosition(false)
|
||||
white:setPosition(CCPointMake(x / 4 * 3, y / 4 * 3))
|
||||
|
||||
layer:addChild(blue, -1)
|
||||
layer:addChild(white)
|
||||
layer:addChild(green)
|
||||
layer:addChild(red)
|
||||
|
||||
local rot = CCRotateBy:create(8, 720)
|
||||
|
||||
blue:runAction(rot)
|
||||
red:runAction(rot:copy():autorelease())
|
||||
green:runAction(rot:copy():autorelease())
|
||||
white:runAction(rot:copy():autorelease())
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
--------------------------------
|
||||
-- Rotate World Test
|
||||
--------------------------------
|
||||
function RotateWorldTest()
|
||||
cclog("RotateWorldTest")
|
||||
local scene = CCScene:create()
|
||||
local layer = CreateRotateWorldLayer()
|
||||
|
||||
scene:addChild(layer)
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:runAction(CCRotateBy:create(4, -360))
|
||||
|
||||
return scene
|
||||
end
|
|
@ -0,0 +1,94 @@
|
|||
require "luaScript/helper"
|
||||
|
||||
Transition_Table =
|
||||
{
|
||||
"CCTransitionJumpZoom",
|
||||
"CCTransitionProgressRadialCCW",
|
||||
"CCTransitionProgressRadialCW",
|
||||
"CCTransitionProgressHorizontal",
|
||||
"CCTransitionProgressVertical",
|
||||
"CCTransitionProgressInOut",
|
||||
"CCTransitionProgressOutIn",
|
||||
"CCTransitionCrossFade",
|
||||
"TransitionPageForward",
|
||||
"TransitionPageBackward",
|
||||
"CCTransitionFadeTR",
|
||||
"CCTransitionFadeBL",
|
||||
"CCTransitionFadeUp",
|
||||
"CCTransitionFadeDown",
|
||||
"CCTransitionTurnOffTiles",
|
||||
"CCTransitionSplitRows",
|
||||
"CCTransitionSplitCols",
|
||||
"CCTransitionFade",
|
||||
"FadeWhiteTransition",
|
||||
"FlipXLeftOver",
|
||||
"FlipXRightOver",
|
||||
"FlipYUpOver",
|
||||
"FlipYDownOver",
|
||||
"FlipAngularLeftOver",
|
||||
"FlipAngularRightOver",
|
||||
"ZoomFlipXLeftOver",
|
||||
"ZoomFlipXRightOver",
|
||||
"ZoomFlipYUpOver",
|
||||
"ZoomFlipYDownOver",
|
||||
"ZoomFlipAngularLeftOver",
|
||||
"ZoomFlipAngularRightOver",
|
||||
"CCTransitionShrinkGrow",
|
||||
"CCTransitionRotoZoom",
|
||||
"CCTransitionMoveInL",
|
||||
"CCTransitionMoveInR",
|
||||
"CCTransitionMoveInT",
|
||||
"CCTransitionMoveInB",
|
||||
"CCTransitionSlideInL",
|
||||
"CCTransitionSlideInR",
|
||||
"CCTransitionSlideInT",
|
||||
"CCTransitionSlideInB",
|
||||
"MAX_LAYER",
|
||||
}
|
||||
|
||||
Transition_Table = CreateEnumTable(Transition_Table)
|
||||
|
||||
Transition_Name =
|
||||
{
|
||||
[0] = "CCTransitionJumpZoom",
|
||||
"CCTransitionProgressRadialCCW",
|
||||
"CCTransitionProgressRadialCW",
|
||||
"CCTransitionProgressHorizontal",
|
||||
"CCTransitionProgressVertical",
|
||||
"CCTransitionProgressInOut",
|
||||
"CCTransitionProgressOutIn",
|
||||
"CCTransitionCrossFade",
|
||||
"TransitionPageForward",
|
||||
"TransitionPageBackward",
|
||||
"CCTransitionFadeTR",
|
||||
"CCTransitionFadeBL",
|
||||
"CCTransitionFadeUp",
|
||||
"CCTransitionFadeDown",
|
||||
"CCTransitionTurnOffTiles",
|
||||
"CCTransitionSplitRows",
|
||||
"CCTransitionSplitCols",
|
||||
"CCTransitionFade",
|
||||
"FadeWhiteTransition",
|
||||
"FlipXLeftOver",
|
||||
"FlipXRightOver",
|
||||
"FlipYUpOver",
|
||||
"FlipYDownOver",
|
||||
"FlipAngularLeftOver",
|
||||
"FlipAngularRightOver",
|
||||
"ZoomFlipXLeftOver",
|
||||
"ZoomFlipXRightOver",
|
||||
"ZoomFlipYUpOver",
|
||||
"ZoomFlipYDownOver",
|
||||
"ZoomFlipAngularLeftOver",
|
||||
"ZoomFlipAngularRightOver",
|
||||
"CCTransitionShrinkGrow",
|
||||
"CCTransitionRotoZoom",
|
||||
"CCTransitionMoveInL",
|
||||
"CCTransitionMoveInR",
|
||||
"CCTransitionMoveInT",
|
||||
"CCTransitionMoveInB",
|
||||
"CCTransitionSlideInL",
|
||||
"CCTransitionSlideInR",
|
||||
"CCTransitionSlideInT",
|
||||
"CCTransitionSlideInB",
|
||||
}
|
|
@ -0,0 +1,256 @@
|
|||
require "luaScript/TransitionsTest/TransitionsName"
|
||||
|
||||
|
||||
local SceneIdx = 0
|
||||
local TRANSITION_DURATION = 1.2
|
||||
local s = CCDirector:sharedDirector():getWinSize()
|
||||
|
||||
-----------------------------
|
||||
-- TestLayer1
|
||||
-----------------------------
|
||||
local function layer1BackCallback()
|
||||
SceneIdx = SceneIdx - 1
|
||||
if SceneIdx < 0 then
|
||||
SceneIdx = SceneIdx + Transition_Table.MAX_LAYER
|
||||
end
|
||||
|
||||
generateTranScene(2)
|
||||
end
|
||||
|
||||
local function layer1RestartCallback()
|
||||
generateTranScene(2);
|
||||
end
|
||||
|
||||
local function layer1NextCallback()
|
||||
SceneIdx = SceneIdx + 1
|
||||
SceneIdx = math.mod(SceneIdx, Transition_Table.MAX_LAYER)
|
||||
|
||||
generateTranScene(2)
|
||||
end
|
||||
|
||||
local function createLayer1()
|
||||
local layer = CCLayer:create()
|
||||
local x, y = s.width, s.height
|
||||
|
||||
local bg1 = CCSprite:create(s_back1)
|
||||
bg1:setPosition(CCPointMake(s.width / 2, s.height / 2))
|
||||
layer:addChild(bg1, -1)
|
||||
|
||||
local titleLabel = CCLabelTTF:create(Transition_Name[SceneIdx], "Thonburi", 32)
|
||||
layer:addChild(titleLabel)
|
||||
titleLabel:setColor(ccc3(255,32,32))
|
||||
titleLabel:setPosition(x / 2, y - 100)
|
||||
|
||||
local label = CCLabelTTF:create("SCENE 1", "Marker Felt", 38)
|
||||
label:setColor(ccc3(16,16,255))
|
||||
label:setPosition(x / 2, y / 2)
|
||||
layer:addChild(label)
|
||||
|
||||
-- menu
|
||||
local item1 = CCMenuItemImage:create(s_pPathB1, s_pPathB2)
|
||||
local item2 = CCMenuItemImage:create(s_pPathR1, s_pPathR2)
|
||||
local item3 = CCMenuItemImage:create(s_pPathF1, s_pPathF2)
|
||||
item1:registerScriptHandler(layer1BackCallback)
|
||||
item2:registerScriptHandler(layer1RestartCallback)
|
||||
item3:registerScriptHandler(layer1NextCallback)
|
||||
|
||||
local menu = CCMenu:create()
|
||||
menu:addChild(item1)
|
||||
menu:addChild(item2)
|
||||
menu:addChild(item3)
|
||||
menu:setPosition(CCPointMake(0, 0))
|
||||
item1:setPosition(CCPointMake(s.width / 2 - item2:getContentSize().width * 2, item2:getContentSize().height / 2))
|
||||
item2:setPosition(CCPointMake(s.width / 2, item2:getContentSize().height / 2))
|
||||
item3:setPosition(CCPointMake(s.width / 2 + item2:getContentSize().width * 2, item2:getContentSize().height / 2))
|
||||
|
||||
layer:addChild(menu, 1)
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- TestLayer2
|
||||
-----------------------------
|
||||
local function layer2BackCallback()
|
||||
SceneIdx = SceneIdx - 1
|
||||
if SceneIdx < 0 then
|
||||
SceneIdx = SceneIdx + Transition_Table.MAX_LAYER
|
||||
end
|
||||
|
||||
generateTranScene(1)
|
||||
end
|
||||
|
||||
local function layer2RestartCallback()
|
||||
generateTranScene(1);
|
||||
end
|
||||
|
||||
local function layer2NextCallback()
|
||||
SceneIdx = SceneIdx + 1
|
||||
SceneIdx = math.mod(SceneIdx, Transition_Table.MAX_LAYER)
|
||||
|
||||
generateTranScene(1)
|
||||
end
|
||||
|
||||
local function createLayer2()
|
||||
local layer = CCLayer:create()
|
||||
local x, y = s.width, s.height
|
||||
|
||||
local bg1 = CCSprite:create(s_back2)
|
||||
bg1:setPosition(CCPointMake(s.width / 2, s.height / 2))
|
||||
layer:addChild(bg1, -1)
|
||||
|
||||
local titleLabel = CCLabelTTF:create(Transition_Name[SceneIdx], "Thonburi", 32 )
|
||||
layer:addChild(titleLabel)
|
||||
titleLabel:setColor(ccc3(255,32,32))
|
||||
titleLabel:setPosition(x / 2, y - 100)
|
||||
|
||||
local label = CCLabelTTF:create("SCENE 2", "Marker Felt", 38)
|
||||
label:setColor(ccc3(16,16,255))
|
||||
label:setPosition(x / 2, y / 2)
|
||||
layer:addChild(label)
|
||||
|
||||
-- menu
|
||||
local item1 = CCMenuItemImage:create(s_pPathB1, s_pPathB2)
|
||||
local item2 = CCMenuItemImage:create(s_pPathR1, s_pPathR2)
|
||||
local item3 = CCMenuItemImage:create(s_pPathF1, s_pPathF2)
|
||||
item1:registerScriptHandler(layer2BackCallback)
|
||||
item2:registerScriptHandler(layer2RestartCallback)
|
||||
item3:registerScriptHandler(layer2NextCallback)
|
||||
|
||||
local menu = CCMenu:create()
|
||||
menu:addChild(item1)
|
||||
menu:addChild(item2)
|
||||
menu:addChild(item3)
|
||||
menu:setPosition(CCPointMake(0, 0))
|
||||
item1:setPosition(CCPointMake(s.width / 2 - item2:getContentSize().width * 2, item2:getContentSize().height / 2))
|
||||
item2:setPosition(CCPointMake(s.width / 2, item2:getContentSize().height / 2))
|
||||
item3:setPosition(CCPointMake(s.width / 2 + item2:getContentSize().width * 2, item2:getContentSize().height / 2))
|
||||
|
||||
layer:addChild(menu, 1)
|
||||
|
||||
return layer
|
||||
end
|
||||
|
||||
-----------------------------
|
||||
-- Create Transition Test
|
||||
-----------------------------
|
||||
local function createTransition(index, t, scene)
|
||||
CCDirector:sharedDirector():setDepthTest(false)
|
||||
|
||||
if index == Transition_Table.CCTransitionJumpZoom then
|
||||
scene = CCTransitionJumpZoom:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionProgressRadialCCW then
|
||||
scene = CCTransitionProgressRadialCCW:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionProgressRadialCW then
|
||||
scene = CCTransitionProgressRadialCW:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionProgressHorizontal then
|
||||
scene = CCTransitionProgressHorizontal:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionProgressVertical then
|
||||
scene = CCTransitionProgressVertical:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionProgressInOut then
|
||||
scene = CCTransitionProgressInOut:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionProgressOutIn then
|
||||
scene = CCTransitionProgressOutIn:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionCrossFade then
|
||||
scene = CCTransitionCrossFade:create(t, scene)
|
||||
elseif index == Transition_Table.TransitionPageForward then
|
||||
CCDirector:sharedDirector():setDepthTest(true)
|
||||
scene = CCTransitionPageTurn:create(t, scene, false)
|
||||
elseif index == Transition_Table.TransitionPageBackward then
|
||||
CCDirector:sharedDirector():setDepthTest(true)
|
||||
scene = CCTransitionPageTurn:create(t, scene, true)
|
||||
elseif index == Transition_Table.CCTransitionFadeTR then
|
||||
scene = CCTransitionFadeTR:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionFadeBL then
|
||||
scene = CCTransitionFadeBL:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionFadeUp then
|
||||
scene = CCTransitionFadeUp:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionFadeDown then
|
||||
scene = CCTransitionFadeDown:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionTurnOffTiles then
|
||||
scene = CCTransitionTurnOffTiles:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionSplitRows then
|
||||
scene = CCTransitionSplitRows:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionSplitCols then
|
||||
scene = CCTransitionSplitCols:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionFade then
|
||||
scene = CCTransitionFade:create(t, scene)
|
||||
elseif index == Transition_Table.FadeWhiteTransition then
|
||||
scene = CCTransitionFade:create(t, scene, ccc3(255, 255, 255))
|
||||
elseif index == Transition_Table.FlipXLeftOver then
|
||||
scene = CCTransitionFlipX:create(t, scene, kOrientationLeftOver)
|
||||
elseif index == Transition_Table.FlipXRightOver then
|
||||
scene = CCTransitionFlipX:create(t, scene, kOrientationRightOver)
|
||||
elseif index == Transition_Table.FlipYUpOver then
|
||||
scene = CCTransitionFlipY:create(t, scene, kOrientationUpOver)
|
||||
elseif index == Transition_Table.FlipYDownOver then
|
||||
scene = CCTransitionFlipY:create(t, scene, kOrientationDownOver)
|
||||
elseif index == Transition_Table.FlipAngularLeftOver then
|
||||
scene = CCTransitionFlipAngular:create(t, scene, kOrientationLeftOver)
|
||||
elseif index == Transition_Table.FlipAngularRightOver then
|
||||
scene = CCTransitionFlipAngular:create(t, scene, kOrientationRightOver)
|
||||
elseif index == Transition_Table.ZoomFlipXLeftOver then
|
||||
scene = CCTransitionZoomFlipX:create(t, scene, kOrientationLeftOver)
|
||||
elseif index == Transition_Table.ZoomFlipXRightOver then
|
||||
scene = CCTransitionZoomFlipX:create(t, scene, kOrientationRightOver)
|
||||
elseif index == Transition_Table.ZoomFlipYUpOver then
|
||||
scene = CCTransitionZoomFlipY:create(t, scene, kOrientationUpOver)
|
||||
elseif index == Transition_Table.ZoomFlipYDownOver then
|
||||
scene = CCTransitionZoomFlipY:create(t, scene, kOrientationDownOver)
|
||||
elseif index == Transition_Table.ZoomFlipAngularLeftOver then
|
||||
scene = CCTransitionZoomFlipAngular:create(t, scene, kOrientationLeftOver)
|
||||
elseif index == Transition_Table.ZoomFlipAngularRightOver then
|
||||
scene = CCTransitionZoomFlipAngular:create(t, scene, kOrientationRightOver)
|
||||
elseif index == Transition_Table.CCTransitionShrinkGrow then
|
||||
scene = CCTransitionShrinkGrow:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionRotoZoom then
|
||||
scene = CCTransitionRotoZoom:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionMoveInL then
|
||||
scene = CCTransitionMoveInL:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionMoveInR then
|
||||
scene = CCTransitionMoveInR:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionMoveInT then
|
||||
scene = CCTransitionMoveInT:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionMoveInB then
|
||||
scene = CCTransitionMoveInB:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionSlideInL then
|
||||
scene = CCTransitionSlideInL:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionSlideInR then
|
||||
scene = CCTransitionSlideInR:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionSlideInT then
|
||||
scene = CCTransitionSlideInT:create(t, scene)
|
||||
elseif index == Transition_Table.CCTransitionSlideInB then
|
||||
scene = CCTransitionSlideInB:create(t, scene)
|
||||
end
|
||||
|
||||
return scene
|
||||
end
|
||||
|
||||
function generateTranScene(sceneType)
|
||||
local scene = CCScene:create()
|
||||
local layer = nil
|
||||
|
||||
if sceneType == 1 then
|
||||
layer = createLayer1()
|
||||
elseif sceneType == 2 then
|
||||
layer = createLayer2()
|
||||
end
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(layer)
|
||||
|
||||
local tranScene = createTransition(SceneIdx, TRANSITION_DURATION, scene)
|
||||
if tranScene ~= nil then
|
||||
CCDirector:sharedDirector():replaceScene(tranScene)
|
||||
end
|
||||
end
|
||||
|
||||
function TransitionsTest()
|
||||
cclog("TransitionsTest")
|
||||
local scene = CCScene:create()
|
||||
|
||||
scene:addChild(CreateBackMenuItem())
|
||||
scene:addChild(createLayer1())
|
||||
|
||||
return scene
|
||||
end
|
|
@ -0,0 +1,12 @@
|
|||
-- avoid memory leak
|
||||
collectgarbage("setpause", 100)
|
||||
collectgarbage("setstepmul", 5000)
|
||||
|
||||
require "luaScript/mainMenu"
|
||||
----------------
|
||||
|
||||
|
||||
-- run
|
||||
local scene = CCScene:create()
|
||||
scene:addChild(CreateTestMenu())
|
||||
CCDirector:sharedDirector():runWithScene(scene)
|
|
@ -0,0 +1,37 @@
|
|||
-- cclog
|
||||
cclog = function(...)
|
||||
print(string.format(...))
|
||||
end
|
||||
|
||||
-- change table to enum type
|
||||
function CreateEnumTable(tbl, index)
|
||||
local enumTable = {}
|
||||
local enumIndex = index or -1
|
||||
for i, v in ipairs(tbl) do
|
||||
enumTable[v] = enumIndex + i
|
||||
end
|
||||
return enumTable
|
||||
end
|
||||
|
||||
-- back menu callback
|
||||
local function MainMenuCallback()
|
||||
local scene = CCScene:create()
|
||||
scene:addChild(CreateTestMenu())
|
||||
|
||||
CCDirector:sharedDirector():replaceScene(scene)
|
||||
end
|
||||
|
||||
-- add the menu item for back to main menu
|
||||
function CreateBackMenuItem()
|
||||
local label = CCLabelTTF:create("MainMenu", "Arial", 20)
|
||||
local MenuItem = CCMenuItemLabel:create(label)
|
||||
MenuItem:registerScriptHandler(MainMenuCallback)
|
||||
|
||||
local s = CCDirector:sharedDirector():getWinSize()
|
||||
local Menu = CCMenu:create()
|
||||
Menu:addChild(MenuItem)
|
||||
Menu:setPosition(0, 0)
|
||||
MenuItem:setPosition(s.width - 50, 25)
|
||||
|
||||
return Menu
|
||||
end
|
|
@ -0,0 +1,208 @@
|
|||
require "luaScript/tests"
|
||||
require "luaScript/helper"
|
||||
require "luaScript/testResource"
|
||||
------------------------
|
||||
|
||||
|
||||
local LINE_SPACE = 40
|
||||
|
||||
local CurPos = {x = 0, y = 0}
|
||||
local BeginPos = {x = 0, y = 0}
|
||||
|
||||
-- create scene
|
||||
local function CreateTestScene(nIdx)
|
||||
CCDirector:sharedDirector():purgeCachedData()
|
||||
|
||||
local scene = nil
|
||||
if nIdx == Test_Table.TEST_ACTIONS then
|
||||
scene = ActionsTest()
|
||||
elseif nIdx == Test_Table.TEST_TRANSITIONS then
|
||||
scene = TransitionsTest()
|
||||
elseif nIdx == Test_Table.TEST_PROGRESS_ACTIONS then
|
||||
scene = ProgressActionsTest()
|
||||
elseif nIdx == Test_Table.TEST_EFFECTS then
|
||||
scene = EffectsTest()
|
||||
elseif nIdx == Test_Table.TEST_CLICK_AND_MOVE then
|
||||
scene = ClickAndMoveTest()
|
||||
elseif nIdx == Test_Table.TEST_ROTATE_WORLD then
|
||||
scene = RotateWorldTest()
|
||||
elseif nIdx == Test_Table.TEST_PARTICLE then
|
||||
scene = ParticleTest()
|
||||
elseif nIdx == Test_Table.TEST_EASE_ACTIONS then
|
||||
scene = EaseActionsTest()
|
||||
elseif nIdx == Test_Table.TEST_MOTION_STREAK then
|
||||
scene = MotionStreakTest()
|
||||
elseif nIdx == Test_Table.TEST_DRAW_PRIMITIVES then
|
||||
scene = DrawPrimitivesTest()
|
||||
elseif nIdx == Test_Table.TEST_COCOSNODE then
|
||||
scene = CocosNodeTest()
|
||||
elseif nIdx == Test_Table.TEST_TOUCHES then
|
||||
scene = TouchesTest()
|
||||
elseif nIdx == Test_Table.TEST_MENU then
|
||||
scene = MenuTest()
|
||||
elseif nIdx == Test_Table.TEST_ACTION_MANAGER then
|
||||
scene = ActionManagerTest()
|
||||
elseif nIdx == Test_Table.TEST_LAYER then
|
||||
scene = LayerTest()
|
||||
elseif nIdx == Test_Table.TEST_SCENE then
|
||||
scene = SceneTest()
|
||||
elseif nIdx == Test_Table.TEST_PARALLAX then
|
||||
scene = ParallaxTest()
|
||||
elseif nIdx == Test_Table.TEST_TILE_MAP then
|
||||
scene = TileMapTest()
|
||||
elseif nIdx == Test_Table.TEST_INTERVAL then
|
||||
scene = IntervalTest()
|
||||
elseif nIdx == Test_Table.TEST_CHIPMUNKACCELTOUCH then
|
||||
--#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
|
||||
-- pScene = new ChipmunkAccelTouchTestScene()
|
||||
--#else
|
||||
--#ifdef MARMALADEUSECHIPMUNK
|
||||
--#if (MARMALADEUSECHIPMUNK == 1)
|
||||
-- pScene = new ChipmunkAccelTouchTestScene();
|
||||
--#endif
|
||||
-- break;
|
||||
--#endif
|
||||
--#endif
|
||||
elseif nIdx == Test_Table.TEST_LABEL then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_TEXT_INPUT then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_SPRITE then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_SCHEDULER then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_RENDERTEXTURE then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_TEXTURE2D then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_BOX2D then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_BOX2DBED then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_EFFECT_ADVANCE then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_ACCELEROMRTER then
|
||||
|
||||
--#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA)
|
||||
-- elseif nIdx == Test_Table.TEST_KEYPAD then
|
||||
-- pScene = new KeypadTestScene()
|
||||
--#endif
|
||||
elseif nIdx == Test_Table.TEST_COCOSDENSHION then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_PERFORMANCE then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_ZWOPTEX then
|
||||
|
||||
--#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
|
||||
-- bada don't support libcurl
|
||||
--#if (CC_TARGET_PLATFORM != CC_PLATFORM_BADA)
|
||||
-- elseif nIdx == Test_Table.TEST_CURL then
|
||||
|
||||
--#endif
|
||||
--#endif
|
||||
elseif nIdx == Test_Table.TEST_USERDEFAULT then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_BUGS then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_FONTS then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_CURRENT_LANGUAGE then
|
||||
|
||||
--#if (CC_TARGET_PLATFORM != CC_PLATFORM_MARMALADE)
|
||||
-- elseif nIdx == Test_Table.TEST_TEXTURECACHE then pScene = new TextureCacheTestScene()
|
||||
--#endif
|
||||
elseif nIdx == Test_Table.TEST_EXTENSIONS then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_SHADER then
|
||||
|
||||
elseif nIdx == Test_Table.TEST_MUTITOUCH then
|
||||
|
||||
end
|
||||
|
||||
return scene
|
||||
end
|
||||
|
||||
-- create menu
|
||||
function CreateTestMenu()
|
||||
local menuLayer = CCLayer:create()
|
||||
|
||||
local function closeCallback()
|
||||
CCDirector:sharedDirector():endToLua()
|
||||
end
|
||||
|
||||
local function menuCallback(menuTag)
|
||||
cclog(menuTag)
|
||||
local Idx = 0 -- menuTag - 10000
|
||||
local testScene = CreateTestScene(Idx)
|
||||
if testScene then
|
||||
CCDirector:sharedDirector():replaceScene(testScene)
|
||||
end
|
||||
end
|
||||
|
||||
-- add close menu
|
||||
local s = CCDirector:sharedDirector():getWinSize()
|
||||
local CloseItem = CCMenuItemImage:create(s_pPathClose, s_pPathClose)
|
||||
CloseItem:registerScriptHandler(closeCallback)
|
||||
CloseItem:setPosition(s.width - 30, s.height - 30)
|
||||
|
||||
local CloseMenu = CCMenu:create()
|
||||
CloseMenu:setPosition(0, 0)
|
||||
CloseMenu:addChild(CloseItem)
|
||||
menuLayer:addChild(CloseMenu)
|
||||
|
||||
-- add menu items for tests
|
||||
local MainMenu = CCMenu:create()
|
||||
for index, labelName in pairs(Test_Name) do
|
||||
local testLabel = CCLabelTTF:create(labelName, "Arial", 24)
|
||||
local testMenuItem = CCMenuItemLabel:create(testLabel)
|
||||
testMenuItem:setTag(index + 10000)
|
||||
testMenuItem:registerScriptHandler(menuCallback)
|
||||
testMenuItem:setPosition(s.width / 2, (s.height - (index + 1) * LINE_SPACE))
|
||||
|
||||
MainMenu:addChild(testMenuItem, index + 10000)
|
||||
end
|
||||
|
||||
MainMenu:setContentSize(CCSizeMake(s.width, (Test_Table.TESTS_COUNT + 1) * (LINE_SPACE)))
|
||||
MainMenu:setPosition(CurPos.x, CurPos.y)
|
||||
menuLayer:addChild(MainMenu)
|
||||
|
||||
-- handling touch events
|
||||
local function onTouchBegan(x, y)
|
||||
BeginPos = {x = x, y = y}
|
||||
-- CCTOUCHBEGAN event must return true
|
||||
return true
|
||||
end
|
||||
|
||||
local function onTouchMoved(x, y)
|
||||
local nMoveY = y - BeginPos.y
|
||||
local curPosx, curPosy = MainMenu:getPosition()
|
||||
local nextPosy = curPosy + nMoveY
|
||||
local winSize = CCDirector:sharedDirector():getWinSize()
|
||||
if nextPosy < 0 then
|
||||
MainMenu:setPosition(0, 0)
|
||||
return
|
||||
end
|
||||
|
||||
if nextPosy > ((Test_Table.TESTS_COUNT + 1) * LINE_SPACE - winSize.height) then
|
||||
MainMenu:setPosition(0, ((Test_Table.TESTS_COUNT + 1) * LINE_SPACE - winSize.height))
|
||||
return
|
||||
end
|
||||
|
||||
MainMenu:setPosition(curPosx, nextPosy)
|
||||
BeginPos = {x = x, y = y}
|
||||
CurPos = {x = curPosx, y = nextPosy}
|
||||
end
|
||||
|
||||
local function onTouch(eventType, x, y)
|
||||
if eventType == CCTOUCHBEGAN then
|
||||
return onTouchBegan(x, y)
|
||||
elseif eventType == CCTOUCHMOVED then
|
||||
return onTouchMoved(x, y)
|
||||
end
|
||||
end
|
||||
|
||||
menuLayer:setTouchEnabled(true)
|
||||
menuLayer:registerScriptTouchHandler(onTouch)
|
||||
|
||||
return menuLayer
|
||||
end
|
|
@ -0,0 +1,37 @@
|
|||
s_pPathGrossini = "Images/grossini.png"
|
||||
s_pPathSister1 = "Images/grossinis_sister1.png"
|
||||
s_pPathSister2 = "Images/grossinis_sister2.png"
|
||||
s_pPathB1 = "Images/b1.png"
|
||||
s_pPathB2 = "Images/b2.png"
|
||||
s_pPathR1 = "Images/r1.png"
|
||||
s_pPathR2 = "Images/r2.png"
|
||||
s_pPathF1 = "Images/f1.png"
|
||||
s_pPathF2 = "Images/f2.png"
|
||||
s_pPathBlock = "Images/blocks.png"
|
||||
s_back = "Images/background.png"
|
||||
s_back1 = "Images/background1.png"
|
||||
s_back2 = "Images/background2.png"
|
||||
s_back3 = "Images/background3.png"
|
||||
s_stars1 = "Images/stars.png"
|
||||
s_stars2 = "Images/stars2.png"
|
||||
s_fire = "Images/fire.png"
|
||||
s_snow = "Images/snow.png"
|
||||
s_streak = "Images/streak.png"
|
||||
s_PlayNormal = "Images/btn-play-normal.png"
|
||||
s_PlaySelect = "Images/btn-play-selected.png"
|
||||
s_AboutNormal = "Images/btn-about-normal.png"
|
||||
s_AboutSelect = "Images/btn-about-selected.png"
|
||||
s_HighNormal = "Images/btn-highscores-normal.png"
|
||||
s_HighSelect = "Images/btn-highscores-selected.png"
|
||||
s_Ball = "Images/ball.png"
|
||||
s_Paddle = "Images/paddle.png"
|
||||
s_pPathClose = "Images/close.png"
|
||||
s_MenuItem = "Images/menuitemsprite.png"
|
||||
s_SendScore = "Images/SendScoreButton.png"
|
||||
s_PressSendScore = "Images/SendScoreButtonPressed.png"
|
||||
s_Power = "Images/powered.png"
|
||||
s_AtlasTest = "Images/atlastest.png"
|
||||
|
||||
-- tilemaps resource
|
||||
s_TilesPng = "TileMaps/tiles.png"
|
||||
s_LevelMapTga = "TileMaps/levelmap.tga"
|
|
@ -0,0 +1,109 @@
|
|||
require "luaScript/helper"
|
||||
|
||||
require "luaScript/ActionsTest/ActionsTest"
|
||||
require "luaScript/TransitionsTest/TransitionsTest"
|
||||
require "luaScript/ActionsProgressTest/ActionsProgressTest"
|
||||
require "luaScript/EffectsTest/EffectsTest"
|
||||
require "luaScript/ClickAndMoveTest/ClickAndMoveTest"
|
||||
require "luaScript/RotateWorldTest/RotateWorldTest"
|
||||
|
||||
|
||||
----------------------------------------------------
|
||||
|
||||
-- tests scene
|
||||
Test_Table =
|
||||
{
|
||||
"TEST_ACTIONS",
|
||||
"TEST_TRANSITIONS",
|
||||
"TEST_PROGRESS_ACTIONS",
|
||||
"TEST_EFFECTS",
|
||||
"TEST_CLICK_AND_MOVE",
|
||||
"TEST_ROTATE_WORLD",
|
||||
"TEST_PARTICLE",
|
||||
"TEST_EASE_ACTIONS",
|
||||
"TEST_MOTION_STREAK",
|
||||
"TEST_DRAW_PRIMITIVES",
|
||||
"TEST_COCOSNODE",
|
||||
"TEST_TOUCHES",
|
||||
"TEST_MENU",
|
||||
"TEST_ACTION_MANAGER",
|
||||
"TEST_LAYER",
|
||||
"TEST_SCENE",
|
||||
"TEST_PARALLAX",
|
||||
"TEST_TILE_MAP",
|
||||
"TEST_INTERVAL",
|
||||
"TEST_CHIPMUNKACCELTOUCH",
|
||||
"TEST_LABEL",
|
||||
"TEST_TEXT_INPUT",
|
||||
"TEST_SPRITE",
|
||||
"TEST_SCHEDULER",
|
||||
"TEST_RENDERTEXTURE",
|
||||
"TEST_TEXTURE2D",
|
||||
"TEST_BOX2D",
|
||||
"TEST_BOX2DBED",
|
||||
"TEST_EFFECT_ADVANCE",
|
||||
"TEST_ACCELEROMRTER",
|
||||
"TEST_KEYPAD",
|
||||
"TEST_COCOSDENSHION",
|
||||
"TEST_PERFORMANCE",
|
||||
"TEST_ZWOPTEX",
|
||||
"TEST_CURL",
|
||||
"TEST_USERDEFAULT",
|
||||
"TEST_BUGS",
|
||||
"TEST_FONTS",
|
||||
"TEST_CURRENT_LANGUAGE",
|
||||
"TEST_TEXTURECACHE",
|
||||
"TEST_EXTENSIONS",
|
||||
"TEST_SHADER",
|
||||
"TEST_MUTITOUCH",
|
||||
"TESTS_COUNT"
|
||||
}
|
||||
|
||||
Test_Table = CreateEnumTable(Test_Table)
|
||||
|
||||
Test_Name =
|
||||
{
|
||||
[0] = "ActionsTest",
|
||||
"TransitionsTest",
|
||||
"ActionsProgressTest",
|
||||
"EffectsTest",
|
||||
"ClickAndMoveTest",
|
||||
"RotateWorldTest",
|
||||
"ParticleTest",
|
||||
"ActionsEaseTest",
|
||||
"MotionStreakTest",
|
||||
"DrawPrimitivesTest",
|
||||
"NodeTest",
|
||||
"TouchesTest",
|
||||
"MenuTest",
|
||||
"ActionManagerTest",
|
||||
"LayerTest",
|
||||
"SceneTest",
|
||||
"ParallaxTest",
|
||||
"TileMapTest",
|
||||
"IntervalTest",
|
||||
"ChipmunkAccelTouchTest",
|
||||
"LabelTest",
|
||||
"TextInputTest",
|
||||
"SpriteTest",
|
||||
"SchdulerTest",
|
||||
"RenderTextureTest",
|
||||
"Texture2DTest",
|
||||
"Box2dTest",
|
||||
"Box2dTestBed",
|
||||
"EffectAdvancedTest",
|
||||
"Accelerometer",
|
||||
"KeypadTest",
|
||||
"CocosDenshionTest",
|
||||
"PerformanceTest",
|
||||
"ZwoptexTest",
|
||||
"CurlTest",
|
||||
"UserDefaultTest",
|
||||
"BugsTest",
|
||||
"FontTest",
|
||||
"CurrentLanguageTest",
|
||||
"TextureCacheTest",
|
||||
"ExtensionsTest",
|
||||
"ShaderTest",
|
||||
"MutiTouchTest"
|
||||
}
|
|
@ -0,0 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<classpath>
|
||||
<classpathentry kind="src" path="src"/>
|
||||
<classpathentry kind="src" path="src_common"/>
|
||||
<classpathentry kind="src" path="gen"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.ANDROID_FRAMEWORK"/>
|
||||
<classpathentry kind="con" path="com.android.ide.eclipse.adt.LIBRARIES"/>
|
||||
<classpathentry kind="output" path="bin/classes"/>
|
||||
</classpath>
|
|
@ -0,0 +1,40 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>TestLua</name>
|
||||
<comment></comment>
|
||||
<projects>
|
||||
</projects>
|
||||
<buildSpec>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ResourceManagerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.PreCompilerBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>org.eclipse.jdt.core.javabuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
<buildCommand>
|
||||
<name>com.android.ide.eclipse.adt.ApkBuilder</name>
|
||||
<arguments>
|
||||
</arguments>
|
||||
</buildCommand>
|
||||
</buildSpec>
|
||||
<natures>
|
||||
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
|
||||
<nature>org.eclipse.jdt.core.javanature</nature>
|
||||
</natures>
|
||||
<linkedResources>
|
||||
<link>
|
||||
<name>src_common</name>
|
||||
<type>2</type>
|
||||
<locationURI>PARENT-3-PROJECT_LOC/cocos2dx/platform/android/java/src_common</locationURI>
|
||||
</link>
|
||||
</linkedResources>
|
||||
</projectDescription>
|
|
@ -0,0 +1,27 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
package="org.cocos2dx.testlua"
|
||||
android:versionCode="1"
|
||||
android:versionName="1.0">
|
||||
|
||||
<uses-sdk android:minSdkVersion="7" android:targetSdkVersion="8"/>
|
||||
|
||||
<application android:label="@string/app_name"
|
||||
android:debuggable="true" android:icon="@drawable/icon">
|
||||
|
||||
<activity android:name=".TestLua"
|
||||
android:label="@string/app_name"
|
||||
android:screenOrientation="landscape"
|
||||
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
|
||||
android:configChanges="orientation">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
</application>
|
||||
<supports-screens android:largeScreens="true"
|
||||
android:smallScreens="true"
|
||||
android:anyDensity="true"
|
||||
android:normalScreens="true"/>
|
||||
</manifest>
|
|
@ -0,0 +1,17 @@
|
|||
# This file is used to override default values used by the Ant build system.
|
||||
#
|
||||
# This file must be checked into Version Control Systems, as it is
|
||||
# integral to the build system of your project.
|
||||
|
||||
# This file is only used by the Ant script.
|
||||
|
||||
# You can use this to override default values such as
|
||||
# 'source.dir' for the location of your java source folder and
|
||||
# 'out.dir' for the location of your output folder.
|
||||
|
||||
# You can also use it define how the release builds are signed by declaring
|
||||
# the following properties:
|
||||
# 'key.store' for the location of your keystore and
|
||||
# 'key.alias' for the name of the key to use.
|
||||
# The password will be asked during the build when you use the 'release' target.
|
||||
|
|
@ -0,0 +1,83 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project name="TestLua" default="help">
|
||||
|
||||
<!-- The local.properties file is created and updated by the 'android' tool.
|
||||
It contains the path to the SDK. It should *NOT* be checked into
|
||||
Version Control Systems. -->
|
||||
<property file="local.properties" />
|
||||
|
||||
<!-- The ant.properties file can be created by you. It is only edited by the
|
||||
'android' tool to add properties to it.
|
||||
This is the place to change some Ant specific build properties.
|
||||
Here are some properties you may want to change/update:
|
||||
|
||||
source.dir
|
||||
The name of the source directory. Default is 'src'.
|
||||
out.dir
|
||||
The name of the output directory. Default is 'bin'.
|
||||
|
||||
For other overridable properties, look at the beginning of the rules
|
||||
files in the SDK, at tools/ant/build.xml
|
||||
|
||||
Properties related to the SDK location or the project target should
|
||||
be updated using the 'android' tool with the 'update' action.
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems.
|
||||
|
||||
-->
|
||||
<property file="ant.properties" />
|
||||
|
||||
<!-- The project.properties file is created and updated by the 'android'
|
||||
tool, as well as ADT.
|
||||
|
||||
This contains project specific properties such as project target, and library
|
||||
dependencies. Lower level build properties are stored in ant.properties
|
||||
(or in .classpath for Eclipse projects).
|
||||
|
||||
This file is an integral part of the build system for your
|
||||
application and should be checked into Version Control Systems. -->
|
||||
<loadproperties srcFile="project.properties" />
|
||||
|
||||
<!-- quick check on sdk.dir -->
|
||||
<fail
|
||||
message="sdk.dir is missing. Make sure to generate local.properties using 'android update project' or to inject it through an env var"
|
||||
unless="sdk.dir"
|
||||
/>
|
||||
|
||||
<!--
|
||||
Import per project custom build rules if present at the root of the project.
|
||||
This is the place to put custom intermediary targets such as:
|
||||
-pre-build
|
||||
-pre-compile
|
||||
-post-compile (This is typically used for code obfuscation.
|
||||
Compiled code location: ${out.classes.absolute.dir}
|
||||
If this is not done in place, override ${out.dex.input.absolute.dir})
|
||||
-post-package
|
||||
-post-build
|
||||
-pre-clean
|
||||
-->
|
||||
<import file="custom_rules.xml" optional="true" />
|
||||
|
||||
<!-- Import the actual build file.
|
||||
|
||||
To customize existing targets, there are two options:
|
||||
- Customize only one target:
|
||||
- copy/paste the target into this file, *before* the
|
||||
<import> task.
|
||||
- customize it to your needs.
|
||||
- Customize the whole content of build.xml
|
||||
- copy/paste the content of the rules files (minus the top node)
|
||||
into this file, replacing the <import> task.
|
||||
- customize to your needs.
|
||||
|
||||
***********************
|
||||
****** IMPORTANT ******
|
||||
***********************
|
||||
In all cases you must update the value of version-tag below to read 'custom' instead of an integer,
|
||||
in order to avoid having your file be overridden by tools such as "android update project"
|
||||
-->
|
||||
<!-- version-tag: 1 -->
|
||||
<import file="${sdk.dir}/tools/ant/build.xml" />
|
||||
|
||||
</project>
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue