mirror of https://github.com/axmolengine/axmol.git
Merge branch 'gles20' of https://github.com/cocos2d/cocos2d-x into gles20
Conflicts: cocos2dx/kazmath/src/ray2.c
This commit is contained in:
commit
5075a83271
|
@ -41,6 +41,16 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestJavascript", "samples\T
|
|||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "libExtensions", "extensions\proj.win32\libExtensions.vcproj", "{21B2C324-891F-48EA-AD1A-5AE13DE12E28}"
|
||||
EndProject
|
||||
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "TestLua", "samples\TestLua\proj.win32\TestLua.win32.vcproj", "{B53D3C68-96DA-4806-BB26-94888B52191A}"
|
||||
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}
|
||||
|
@ -90,6 +100,10 @@ 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
|
||||
{B53D3C68-96DA-4806-BB26-94888B52191A}.Debug|Win32.ActiveCfg = Debug|Win32
|
||||
{B53D3C68-96DA-4806-BB26-94888B52191A}.Debug|Win32.Build.0 = Debug|Win32
|
||||
{B53D3C68-96DA-4806-BB26-94888B52191A}.Release|Win32.ActiveCfg = Release|Win32
|
||||
{B53D3C68-96DA-4806-BB26-94888B52191A}.Release|Win32.Build.0 = Release|Win32
|
||||
EndGlobalSection
|
||||
GlobalSection(SolutionProperties) = preSolution
|
||||
HideSolutionNode = FALSE
|
||||
|
|
|
@ -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);
|
||||
}
|
||||
|
||||
|
@ -953,7 +953,7 @@ void CCDisplayLinkDirector::startAnimation(void)
|
|||
}
|
||||
|
||||
m_bInvalid = false;
|
||||
CCApplication::sharedApplication().setAnimationInterval(m_dAnimationInterval);
|
||||
CCApplication::sharedApplication()->setAnimationInterval(m_dAnimationInterval);
|
||||
}
|
||||
|
||||
void CCDisplayLinkDirector::mainLoop(void)
|
||||
|
|
|
@ -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-rc2-x-2.0.1";
|
||||
return "cocos2d-2.0-x-2.0.2";
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -165,7 +165,7 @@ Only valid for cocos2d-mac. Not supported on cocos2d-ios.
|
|||
|
||||
*/
|
||||
#ifndef CC_TEXTURE_ATLAS_USE_VAO
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32)
|
||||
#if (CC_TARGET_PLATFORM == CC_PLATFORM_IOS) || (CC_TARGET_PLATFORM == CC_PLATFORM_WIN32) || (CC_TARGET_PLATFORM == CC_PLATFORM_MAC)
|
||||
#define CC_TEXTURE_ATLAS_USE_VAO 1
|
||||
#else
|
||||
/* Some android devices cannot support VAO very well, so we disable it by default for android platform. */
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -216,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
|
||||
|
|
|
@ -149,6 +149,7 @@ void CCEGLViewProtocol::setTouchDelegate(EGLTouchDelegate * pDelegate)
|
|||
|
||||
bool CCEGLViewProtocol::setContentScaleFactor(float contentScaleFactor)
|
||||
{
|
||||
m_fScaleX = m_fScaleY = contentScaleFactor;
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -69,10 +69,10 @@ CCApplication::Orientation CCApplication::setOrientation(Orientation orientation
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/**
|
||||
@brief Get current language config
|
||||
|
|
|
@ -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"
|
||||
|
||||
|
@ -76,15 +77,14 @@ void CCEGLView::swapBuffers()
|
|||
{
|
||||
}
|
||||
|
||||
CCEGLView& CCEGLView::sharedOpenGLView()
|
||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
||||
{
|
||||
static CCEGLView instance;
|
||||
return instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
void CCEGLView::setIMEKeyboardState(bool bOpen)
|
||||
{
|
||||
|
||||
setKeyboardStateJNI((int)bOpen);
|
||||
}
|
||||
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
/**
|
||||
@brief get the shared main open gl window
|
||||
*/
|
||||
static CCEGLView& sharedOpenGLView();
|
||||
static CCEGLView* sharedOpenGLView();
|
||||
};
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -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);
|
||||
|
||||
@Override
|
||||
public Cocos2dxGLSurfaceView getGLView() {
|
||||
return mGLView;
|
||||
}
|
||||
|
||||
@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();
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -51,7 +51,7 @@ int CCApplication::run()
|
|||
|
||||
while (1) // or device wants to quit
|
||||
{
|
||||
CCEGLView::sharedOpenGLView().handleEvents();
|
||||
CCEGLView::sharedOpenGLView()->handleEvents();
|
||||
|
||||
clock_gettime(CLOCK_REALTIME, &time_struct);
|
||||
current_time = time2millis(&time_struct);
|
||||
|
@ -106,10 +106,10 @@ TargetPlatform CCApplication::getTargetPlatform()
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -49,7 +49,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/**
|
||||
@brief Get current language config
|
||||
|
|
|
@ -189,7 +189,7 @@ void CCEGLView::swapBuffers()
|
|||
eglSwapBuffers(m_eglDisplay, m_eglSurface);
|
||||
}
|
||||
|
||||
CCEGLView& CCEGLView::sharedOpenGLView()
|
||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
||||
{
|
||||
if (!s_pInstance)
|
||||
{
|
||||
|
@ -197,7 +197,7 @@ CCEGLView& CCEGLView::sharedOpenGLView()
|
|||
}
|
||||
|
||||
CCAssert(s_pInstance != NULL, "CCEGLView wasn't constructed yet");
|
||||
return *s_pInstance;
|
||||
return s_pInstance;
|
||||
}
|
||||
|
||||
void CCEGLView::showKeyboard()
|
||||
|
@ -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)
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/**
|
||||
@brief Callback by CCDirector for limit FPS.
|
||||
|
|
|
@ -63,10 +63,10 @@ void CCApplication::setAnimationInterval(double interval)
|
|||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
virtual void setIMEKeyboardState(bool bOpen);
|
||||
|
||||
static CCEGLView& sharedOpenGLView();
|
||||
static CCEGLView* sharedOpenGLView();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -106,10 +106,10 @@ void CCEGLView::setIMEKeyboardState(bool bOpen)
|
|||
}
|
||||
}
|
||||
|
||||
CCEGLView& CCEGLView::sharedOpenGLView()
|
||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
||||
{
|
||||
static CCEGLView instance;
|
||||
return instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
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];
|
||||
}
|
||||
|
|
|
@ -228,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);
|
||||
}
|
||||
|
||||
if (! font)
|
||||
{
|
||||
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];
|
||||
|
||||
if (! font)
|
||||
{
|
||||
font = [UIFont systemFontOfSize:nSize];
|
||||
}
|
||||
|
||||
if (font)
|
||||
{
|
||||
dim = _calculateStringSizeWithFontOrZFont(str, font, &constrainSize, false);
|
||||
}
|
||||
|
||||
if (! font)
|
||||
{
|
||||
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];
|
||||
|
||||
if (! font)
|
||||
{
|
||||
font = [UIFont systemFontOfSize:nSize];
|
||||
}
|
||||
|
||||
if (font)
|
||||
{
|
||||
dim = _calculateStringSizeWithFontOrZFont(str, font, &constrainSize, false);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
CC_BREAK_IF(! font);
|
||||
|
|
|
@ -405,7 +405,7 @@ static EAGLView *view = 0;
|
|||
ys[i] = [touch locationInView: [touch view]].y;
|
||||
++i;
|
||||
}
|
||||
cocos2d::CCEGLView::sharedOpenGLView().handleTouchesBegin(i, ids, xs, ys);
|
||||
cocos2d::CCEGLView::sharedOpenGLView()->handleTouchesBegin(i, ids, xs, ys);
|
||||
}
|
||||
|
||||
- (void)touchesMoved:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
|
@ -425,7 +425,7 @@ static EAGLView *view = 0;
|
|||
ys[i] = [touch locationInView: [touch view]].y;
|
||||
++i;
|
||||
}
|
||||
cocos2d::CCEGLView::sharedOpenGLView().handleTouchesMove(i, ids, xs, ys);
|
||||
cocos2d::CCEGLView::sharedOpenGLView()->handleTouchesMove(i, ids, xs, ys);
|
||||
}
|
||||
|
||||
- (void)touchesEnded:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
|
@ -446,7 +446,7 @@ static EAGLView *view = 0;
|
|||
ys[i] = [touch locationInView: [touch view]].y;
|
||||
++i;
|
||||
}
|
||||
cocos2d::CCEGLView::sharedOpenGLView().handleTouchesEnd(i, ids, xs, ys);
|
||||
cocos2d::CCEGLView::sharedOpenGLView()->handleTouchesEnd(i, ids, xs, ys);
|
||||
}
|
||||
|
||||
- (void)touchesCancelled:(NSSet *)touches withEvent:(UIEvent *)event
|
||||
|
@ -467,7 +467,7 @@ static EAGLView *view = 0;
|
|||
ys[i] = [touch locationInView: [touch view]].y;
|
||||
++i;
|
||||
}
|
||||
cocos2d::CCEGLView::sharedOpenGLView().handleTouchesCancel(i, ids, xs, ys);
|
||||
cocos2d::CCEGLView::sharedOpenGLView()->handleTouchesCancel(i, ids, xs, ys);
|
||||
}
|
||||
|
||||
#pragma mark -
|
||||
|
@ -797,7 +797,7 @@ static EAGLView *view = 0;
|
|||
end.size.height);
|
||||
notiInfo.duration = (float)aniDuration;
|
||||
|
||||
float offestY = cocos2d::CCEGLView::sharedOpenGLView().getViewPortRect().origin.y;
|
||||
float offestY = cocos2d::CCEGLView::sharedOpenGLView()->getViewPortRect().origin.y;
|
||||
|
||||
if (offestY > 0.0f)
|
||||
{
|
||||
|
@ -806,10 +806,10 @@ static EAGLView *view = 0;
|
|||
notiInfo.end.size.height -= offestY;
|
||||
}
|
||||
|
||||
if (!cocos2d::CCEGLView::sharedOpenGLView().isRetinaEnabled())
|
||||
if (!cocos2d::CCEGLView::sharedOpenGLView()->isRetinaEnabled())
|
||||
{
|
||||
float scaleX = cocos2d::CCEGLView::sharedOpenGLView().getScaleX();
|
||||
float scaleY = cocos2d::CCEGLView::sharedOpenGLView().getScaleY();
|
||||
float scaleX = cocos2d::CCEGLView::sharedOpenGLView()->getScaleX();
|
||||
float scaleY = cocos2d::CCEGLView::sharedOpenGLView()->getScaleY();
|
||||
|
||||
notiInfo.begin.origin.x /= scaleX;
|
||||
notiInfo.begin.origin.y /= scaleY;
|
||||
|
@ -860,9 +860,9 @@ static EAGLView *view = 0;
|
|||
|
||||
if (dis < 0.0f) dis = 0.0f;
|
||||
|
||||
if (!cocos2d::CCEGLView::sharedOpenGLView().isRetinaEnabled())
|
||||
if (!cocos2d::CCEGLView::sharedOpenGLView()->isRetinaEnabled())
|
||||
{
|
||||
dis *= cocos2d::CCEGLView::sharedOpenGLView().getScaleY();
|
||||
dis *= cocos2d::CCEGLView::sharedOpenGLView()->getScaleY();
|
||||
}
|
||||
|
||||
switch ([[UIApplication sharedApplication] statusBarOrientation])
|
||||
|
|
|
@ -92,10 +92,10 @@ TargetPlatform CCApplication::getTargetPlatform()
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -35,7 +35,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/* override functions */
|
||||
virtual ccLanguageType getCurrentLanguage();
|
||||
|
|
|
@ -122,10 +122,10 @@ void mouseButtonEventHandle(int iMouseID,int iMouseState) {
|
|||
*/
|
||||
int id = 0;
|
||||
if (iMouseState == GLFW_PRESS) {
|
||||
CCEGLView::sharedOpenGLView().handleTouchesBegin(1, &id, &oPoint.x, &oPoint.y);
|
||||
CCEGLView::sharedOpenGLView()->handleTouchesBegin(1, &id, &oPoint.x, &oPoint.y);
|
||||
|
||||
} else if (iMouseState == GLFW_RELEASE) {
|
||||
CCEGLView::sharedOpenGLView().handleTouchesEnd(1, &id, &oPoint.x, &oPoint.y);
|
||||
CCEGLView::sharedOpenGLView()->handleTouchesEnd(1, &id, &oPoint.x, &oPoint.y);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@ -138,7 +138,7 @@ void mousePosEventHandle(int iPosX,int iPosY) {
|
|||
int id = 0;
|
||||
float x = (float)iPosX;
|
||||
float y = (float)iPosY;
|
||||
CCEGLView::sharedOpenGLView().handleTouchesMove(1, &id, &x, &y);
|
||||
CCEGLView::sharedOpenGLView()->handleTouchesMove(1, &id, &x, &y);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -292,14 +292,14 @@ void CCEGLView::destroyGL()
|
|||
*/
|
||||
}
|
||||
|
||||
CCEGLView& CCEGLView::sharedOpenGLView()
|
||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
||||
{
|
||||
static CCEGLView* s_pEglView = NULL;
|
||||
if (s_pEglView == NULL)
|
||||
{
|
||||
s_pEglView = new CCEGLView();
|
||||
}
|
||||
return *s_pEglView;
|
||||
return s_pEglView;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -40,7 +40,7 @@ public:
|
|||
/**
|
||||
@brief get the shared main open gl window
|
||||
*/
|
||||
static CCEGLView& sharedOpenGLView();
|
||||
static CCEGLView* sharedOpenGLView();
|
||||
private:
|
||||
bool initGL();
|
||||
void destroyGL();
|
||||
|
|
|
@ -12,6 +12,9 @@
|
|||
#include "CCApplication.h"
|
||||
#include "cocoa/CCString.h"
|
||||
#include <unistd.h>
|
||||
#include <sys/stat.h>
|
||||
#include <stdio.h>
|
||||
#include <errno.h>
|
||||
|
||||
using namespace std;
|
||||
|
||||
|
@ -45,13 +48,17 @@ void CCFileUtils::purgeCachedEntries()
|
|||
|
||||
const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
||||
{
|
||||
const char* pszRootPath = CCApplication::sharedApplication().getResourceRootPath();
|
||||
if (pszRelativePath && pszRelativePath[0] == '/')
|
||||
{
|
||||
return pszRelativePath;
|
||||
}
|
||||
|
||||
const char* pszRootPath = CCApplication::sharedApplication()->getResourceRootPath();
|
||||
|
||||
CCString* pRet = CCString::create(pszRootPath);
|
||||
const char* resDir = CCFileUtils::sharedFileUtils()->getResourceDirectory();
|
||||
if (resDir != NULL)
|
||||
if (m_obDirectory.size() > 0)
|
||||
{
|
||||
pRet->m_sString += resDir;
|
||||
pRet->m_sString += m_obDirectory.c_str();
|
||||
}
|
||||
|
||||
if (pszRelativePath != NULL)
|
||||
|
@ -59,6 +66,20 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
|||
pRet->m_sString += pszRelativePath;
|
||||
}
|
||||
|
||||
// check if file or path exist
|
||||
struct stat sts;
|
||||
if (stat(pRet->getCString(), &sts) == -1 && errno == ENOENT)
|
||||
{
|
||||
// find from "Resources/"
|
||||
pRet->m_sString.clear();
|
||||
pRet->m_sString = CCApplication::sharedApplication()->getResourceRootPath();
|
||||
pRet->m_sString += pszRelativePath;
|
||||
if (stat(pRet->getCString(), &sts) == -1 && errno == ENOENT)
|
||||
{
|
||||
return pszRelativePath;
|
||||
}
|
||||
}
|
||||
|
||||
return pRet->getCString();
|
||||
}
|
||||
|
||||
|
@ -104,7 +125,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
|
||||
|
|
|
@ -56,7 +56,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/**
|
||||
@brief Get current language config
|
||||
|
|
|
@ -69,10 +69,10 @@ TargetPlatform CCApplication::getTargetPlatform()
|
|||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -48,7 +48,7 @@ public:
|
|||
|
||||
void setMultiTouchMask(bool mask);
|
||||
|
||||
static CCEGLView& sharedOpenGLView();
|
||||
static CCEGLView* sharedOpenGLView();
|
||||
|
||||
};
|
||||
|
||||
|
|
|
@ -83,10 +83,10 @@ void CCEGLView::setMultiTouchMask(bool mask)
|
|||
//glView.multipleTouchEnabled = mask ? YES : NO;
|
||||
}
|
||||
|
||||
CCEGLView& CCEGLView::sharedOpenGLView()
|
||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
||||
{
|
||||
static CCEGLView instance;
|
||||
return instance;
|
||||
return &instance;
|
||||
}
|
||||
|
||||
} // end of namespace cocos2d;
|
||||
|
|
|
@ -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];
|
||||
}
|
||||
|
|
|
@ -30,4 +30,10 @@ THE SOFTWARE.
|
|||
|
||||
#define CC_GL_DEPTH24_STENCIL8 -1
|
||||
|
||||
|
||||
#define glDeleteVertexArrays glDeleteVertexArraysAPPLE
|
||||
#define glGenVertexArrays glGenVertexArraysAPPLE
|
||||
#define glBindVertexArray glBindVertexArrayAPPLE
|
||||
|
||||
|
||||
#endif // __CCGL_H__
|
||||
|
|
|
@ -168,12 +168,12 @@ void CCAccelerometer::setDelegate(CCAccelerometerDelegate* pDelegate)
|
|||
if (pDelegate)
|
||||
{
|
||||
// Register our handler
|
||||
CCEGLView::sharedOpenGLView().setAccelerometerKeyHook( &myAccelerometerKeyHook );
|
||||
CCEGLView::sharedOpenGLView()->setAccelerometerKeyHook( &myAccelerometerKeyHook );
|
||||
}
|
||||
else
|
||||
{
|
||||
// De-register our handler
|
||||
CCEGLView::sharedOpenGLView().setAccelerometerKeyHook( NULL );
|
||||
CCEGLView::sharedOpenGLView()->setAccelerometerKeyHook( NULL );
|
||||
resetAccelerometer();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -48,9 +48,9 @@ int CCApplication::run()
|
|||
return 0;
|
||||
}
|
||||
|
||||
CCEGLView& mainWnd = CCEGLView::sharedOpenGLView();
|
||||
mainWnd.centerWindow();
|
||||
ShowWindow(mainWnd.getHWnd(), SW_SHOW);
|
||||
CCEGLView* pMainWnd = CCEGLView::sharedOpenGLView();
|
||||
pMainWnd->centerWindow();
|
||||
ShowWindow(pMainWnd->getHWnd(), SW_SHOW);
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -99,10 +99,10 @@ void CCApplication::setAnimationInterval(double interval)
|
|||
//////////////////////////////////////////////////////////////////////////
|
||||
// static member function
|
||||
//////////////////////////////////////////////////////////////////////////
|
||||
CCApplication& CCApplication::sharedApplication()
|
||||
CCApplication* CCApplication::sharedApplication()
|
||||
{
|
||||
CC_ASSERT(sm_pSharedApplication);
|
||||
return *sm_pSharedApplication;
|
||||
return sm_pSharedApplication;
|
||||
}
|
||||
|
||||
ccLanguageType CCApplication::getCurrentLanguage()
|
||||
|
|
|
@ -24,7 +24,7 @@ public:
|
|||
@brief Get current applicaiton instance.
|
||||
@return Current application instance pointer.
|
||||
*/
|
||||
static CCApplication& sharedApplication();
|
||||
static CCApplication* sharedApplication();
|
||||
|
||||
/* override functions */
|
||||
virtual void setAnimationInterval(double interval);
|
||||
|
|
|
@ -210,7 +210,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
if (m_pDelegate && MK_LBUTTON == wParam)
|
||||
{
|
||||
POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)};
|
||||
CCPoint pt(point.x/CC_CONTENT_SCALE_FACTOR(), point.y/CC_CONTENT_SCALE_FACTOR());
|
||||
CCPoint pt(point.x, point.y);
|
||||
CCPoint tmp = ccp(pt.x, m_obScreenSize.height - pt.y);
|
||||
if (m_obViewPortRect.equals(CCRectZero) || m_obViewPortRect.containsPoint(tmp))
|
||||
{
|
||||
|
@ -226,7 +226,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
if (MK_LBUTTON == wParam && m_bCaptured)
|
||||
{
|
||||
POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)};
|
||||
CCPoint pt(point.x/CC_CONTENT_SCALE_FACTOR(), point.y/CC_CONTENT_SCALE_FACTOR());
|
||||
CCPoint pt(point.x, point.y);
|
||||
int id = 0;
|
||||
handleTouchesMove(1, &id, &pt.x, &pt.y);
|
||||
}
|
||||
|
@ -236,7 +236,7 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
if (m_bCaptured)
|
||||
{
|
||||
POINT point = {(short)LOWORD(lParam), (short)HIWORD(lParam)};
|
||||
CCPoint pt(point.x/CC_CONTENT_SCALE_FACTOR(), point.y/CC_CONTENT_SCALE_FACTOR());
|
||||
CCPoint pt(point.x, point.y);
|
||||
int id = 0;
|
||||
handleTouchesEnd(1, &id, &pt.x, &pt.y);
|
||||
|
||||
|
@ -248,10 +248,10 @@ LRESULT CCEGLView::WindowProc(UINT message, WPARAM wParam, LPARAM lParam)
|
|||
switch (wParam)
|
||||
{
|
||||
case SIZE_RESTORED:
|
||||
CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
break;
|
||||
case SIZE_MINIMIZED:
|
||||
CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
break;
|
||||
}
|
||||
break;
|
||||
|
@ -370,6 +370,11 @@ void CCEGLView::setIMEKeyboardState(bool /*bOpen*/)
|
|||
|
||||
}
|
||||
|
||||
bool CCEGLView::enableRetina()
|
||||
{
|
||||
return true;
|
||||
}
|
||||
|
||||
HWND CCEGLView::getHWnd()
|
||||
{
|
||||
return m_hWnd;
|
||||
|
@ -446,14 +451,14 @@ bool CCEGLView::setContentScaleFactor(float contentScaleFactor)
|
|||
return true;
|
||||
}
|
||||
|
||||
CCEGLView& CCEGLView::sharedOpenGLView()
|
||||
CCEGLView* CCEGLView::sharedOpenGLView()
|
||||
{
|
||||
static CCEGLView* s_pEglView = NULL;
|
||||
if (s_pEglView == NULL)
|
||||
{
|
||||
s_pEglView = new CCEGLView();
|
||||
}
|
||||
return *s_pEglView;
|
||||
return s_pEglView;
|
||||
}
|
||||
|
||||
NS_CC_END
|
||||
|
|
|
@ -47,7 +47,7 @@ public:
|
|||
virtual bool setContentScaleFactor(float contentScaleFactor);
|
||||
virtual void setFrameSize(float width, float height);
|
||||
virtual void setIMEKeyboardState(bool bOpen);
|
||||
|
||||
virtual bool enableRetina();
|
||||
private:
|
||||
virtual bool Create(LPCTSTR pTitle, int w, int h);
|
||||
bool initGL();
|
||||
|
@ -67,7 +67,7 @@ public:
|
|||
/**
|
||||
@brief get the shared main open gl window
|
||||
*/
|
||||
static CCEGLView& sharedOpenGLView();
|
||||
static CCEGLView* sharedOpenGLView();
|
||||
|
||||
protected:
|
||||
|
||||
|
|
|
@ -37,17 +37,11 @@ static void _CheckPath()
|
|||
{
|
||||
if (! s_pszResourcePath[0])
|
||||
{
|
||||
WCHAR wszPath[MAX_PATH];
|
||||
WCHAR wszPath[MAX_PATH] = {0};
|
||||
int nNum = WideCharToMultiByte(CP_ACP, 0, wszPath,
|
||||
GetCurrentDirectoryW(sizeof(wszPath), wszPath),
|
||||
s_pszResourcePath, MAX_PATH, NULL, NULL);
|
||||
s_pszResourcePath[nNum] = '\\';
|
||||
const char* resDir = CCFileUtils::sharedFileUtils()->getResourceDirectory();
|
||||
if (resDir != NULL)
|
||||
{
|
||||
strcat(s_pszResourcePath, resDir);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -58,6 +52,7 @@ CCFileUtils* CCFileUtils::sharedFileUtils()
|
|||
if (s_pFileUtils == NULL)
|
||||
{
|
||||
s_pFileUtils = new CCFileUtils();
|
||||
_CheckPath();
|
||||
}
|
||||
return s_pFileUtils;
|
||||
}
|
||||
|
@ -79,10 +74,10 @@ void CCFileUtils::purgeCachedEntries()
|
|||
|
||||
const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
||||
{
|
||||
_CheckPath();
|
||||
bool bFileExist = true;
|
||||
const char* resDir = CCFileUtils::sharedFileUtils()->getResourceDirectory();
|
||||
CCString* pRet = CCString::create("");
|
||||
|
||||
CCString * pRet = new CCString();
|
||||
pRet->autorelease();
|
||||
if ((strlen(pszRelativePath) > 1 && pszRelativePath[1] == ':'))
|
||||
{
|
||||
// path start with "x:", is absolute path
|
||||
|
@ -99,19 +94,35 @@ const char* CCFileUtils::fullPathFromRelativePath(const char *pszRelativePath)
|
|||
else
|
||||
{
|
||||
pRet->m_sString = s_pszResourcePath;
|
||||
pRet->m_sString += resDir;
|
||||
pRet->m_sString += pszRelativePath;
|
||||
}
|
||||
|
||||
// If file or directory doesn't exist, try to find it in the root path.
|
||||
if (GetFileAttributesA(pRet->m_sString.c_str()) == -1)
|
||||
{
|
||||
pRet->m_sString = s_pszResourcePath;
|
||||
pRet->m_sString += pszRelativePath;
|
||||
|
||||
if (GetFileAttributesA(pRet->m_sString.c_str()) == -1)
|
||||
{
|
||||
bFileExist = false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!bFileExist)
|
||||
{ // Can't find the file, return the relative path.
|
||||
pRet->m_sString = pszRelativePath;
|
||||
}
|
||||
|
||||
return pRet->m_sString.c_str();
|
||||
}
|
||||
|
||||
const char *CCFileUtils::fullPathFromRelativeFile(const char *pszFilename, const char *pszRelativeFile)
|
||||
{
|
||||
_CheckPath();
|
||||
// std::string relativeFile = fullPathFromRelativePath(pszRelativeFile);
|
||||
std::string relativeFile = pszRelativeFile;
|
||||
CCString *pRet = new CCString();
|
||||
pRet->autorelease();
|
||||
CCString *pRet = CCString::create("");
|
||||
pRet->m_sString = relativeFile.substr(0, relativeFile.find_last_of("/\\") + 1);
|
||||
pRet->m_sString += pszFilename;
|
||||
return pRet->m_sString.c_str();
|
||||
|
|
|
@ -189,14 +189,13 @@ STATICLIBS_DIR = ../platform/third_party/linux/libraries
|
|||
endif
|
||||
STATICLIBS =
|
||||
STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \
|
||||
$(STATICLIBS_DIR)/libcurl.a \
|
||||
$(STATICLIBS_DIR)/libxml2.a \
|
||||
$(STATICLIBS_DIR)/libpng.a \
|
||||
$(STATICLIBS_DIR)/libjpeg.a \
|
||||
$(STATICLIBS_DIR)/libtiff.a \
|
||||
|
||||
SHAREDLIBS =
|
||||
SHAREDLIBS += -lglfw -lGL
|
||||
SHAREDLIBS += -lglfw -lGL -lcurl
|
||||
SHAREDLIBS += -Wl,-rpath,../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
||||
SHAREDLIBS += -L../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib -lGLEW
|
||||
|
||||
|
|
|
@ -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));
|
||||
}
|
||||
|
||||
|
|
|
@ -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
|
||||
{
|
||||
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() );
|
||||
if (m_sTMXFileName.find_last_of("/") != string::npos)
|
||||
{
|
||||
string dir = m_sTMXFileName.substr(0, m_sTMXFileName.find_last_of("/") + 1);
|
||||
tileset->m_sSourceImage = dir + imagename;
|
||||
}
|
||||
else
|
||||
{
|
||||
tileset->m_sSourceImage = CCFileUtils::sharedFileUtils()->fullPathFromRelativeFile(imagename.c_str(), pTMXMapInfo->getTMXFileName());
|
||||
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#g" $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 empty/../../../.. empty/../../..
|
||||
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
|
|
@ -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
|
||||
|
|
|
@ -113,7 +113,7 @@ CCNode * CCBReader::readNodeGraphFromFile(CCString * pCCBRootPath, CCString * pC
|
|||
this->mCurrentBit = 0;
|
||||
|
||||
this->mOwner = pOwner;
|
||||
this->mOwner->retain();
|
||||
CC_SAFE_RETAIN(this->mOwner);
|
||||
this->mRootContainerSize = pRootContainerSize;
|
||||
|
||||
CCNode * node = NULL;
|
||||
|
|
|
@ -79,7 +79,6 @@ CCEditBox* CCEditBox::create(const CCSize& size, CCScale9Sprite* pNormal9SpriteB
|
|||
|
||||
bool CCEditBox::initWithSizeAndBackgroundSprite(const CCSize& size, CCScale9Sprite* pPressed9SpriteBg)
|
||||
{
|
||||
#if 0
|
||||
if (CCControlButton::initWithBackgroundSprite(pPressed9SpriteBg))
|
||||
{
|
||||
m_pEditBoxImpl = __createSystemEditBox(this);
|
||||
|
@ -87,11 +86,10 @@ 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;
|
||||
}
|
||||
#endif
|
||||
return false;
|
||||
}
|
||||
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -62,16 +62,16 @@ bool CCEditBoxImplIOS::initWithSize(const CCSize& size)
|
|||
{
|
||||
do
|
||||
{
|
||||
CCEGLViewProtocol& eglView = CCEGLView::sharedOpenGLView();
|
||||
CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView();
|
||||
|
||||
CGRect rect;
|
||||
if (eglView.isRetinaEnabled())
|
||||
if (eglView->isRetinaEnabled())
|
||||
{
|
||||
rect = CGRectMake(0, 0, size.width,size.height);
|
||||
}
|
||||
else
|
||||
{
|
||||
rect = CGRectMake(0, 0, size.width * eglView.getScaleX(),size.height * eglView.getScaleY());
|
||||
rect = CGRectMake(0, 0, size.width * eglView->getScaleX(),size.height * eglView->getScaleY());
|
||||
}
|
||||
m_pSysEdit = [[EditBoxImplIOS alloc] initWithFrame:rect editBox:this];
|
||||
if (!m_pSysEdit) break;
|
||||
|
@ -198,18 +198,18 @@ void CCEditBoxImplIOS::setPlaceHolder(const char* pText)
|
|||
static CGPoint convertDesignCoordToScreenCoord(const CCPoint& designCoord)
|
||||
{
|
||||
float viewH = (float)[[EAGLView sharedEGLView] getHeight];
|
||||
CCEGLViewProtocol& eglView = CCEGLView::sharedOpenGLView();
|
||||
CCEGLViewProtocol* eglView = CCEGLView::sharedOpenGLView();
|
||||
CCPoint visiblePos;
|
||||
if (eglView.isRetinaEnabled())
|
||||
if (eglView->isRetinaEnabled())
|
||||
{
|
||||
visiblePos = ccp(designCoord.x, designCoord.y);
|
||||
}
|
||||
else
|
||||
{
|
||||
visiblePos = ccp(designCoord.x * eglView.getScaleX(), designCoord.y * eglView.getScaleY());
|
||||
visiblePos = ccp(designCoord.x * eglView->getScaleX(), designCoord.y * eglView->getScaleY());
|
||||
}
|
||||
|
||||
CCPoint screenGLPos = ccpAdd(visiblePos, eglView.getViewPortRect().origin);
|
||||
CCPoint screenGLPos = ccpAdd(visiblePos, eglView->getViewPortRect().origin);
|
||||
CGPoint screenPos = CGPointMake(screenGLPos.x, viewH - screenGLPos.y);
|
||||
return screenPos;
|
||||
}
|
||||
|
|
|
@ -25,6 +25,7 @@ if ! test -d $DIR_GLEW170/glew-1.7.0/; then
|
|||
DEPENDS+=' libglfw-dev'
|
||||
DEPENDS+=' g++'
|
||||
DEPENDS+=' libzip-dev'
|
||||
DEPENDS+=' libcurl4-gnutls-dev'
|
||||
for i in $DEPENDS; do
|
||||
echo -e $TXTCOLOR_GREEN"sudo apt-get install $i, please enter your password:"$TXTCOLOR_DEFAULT
|
||||
sudo apt-get install $i
|
||||
|
|
|
@ -15,7 +15,7 @@ bool AppDelegate::applicationDidFinishLaunching() {
|
|||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
|
||||
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
||||
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
|
||||
|
||||
TargetPlatform target = getTargetPlatform();
|
||||
|
||||
|
@ -26,7 +26,7 @@ bool AppDelegate::applicationDidFinishLaunching() {
|
|||
CCFileUtils::sharedFileUtils()->setResourceDirectory("iphonehd");
|
||||
|
||||
// don't enable retina because we don't have ipad hd resource
|
||||
CCEGLView::sharedOpenGLView().setDesignResolutionSize(960, 640, kResolutionNoBorder);
|
||||
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(960, 640, kResolutionNoBorder);
|
||||
}
|
||||
else if (target == kTargetIphone)
|
||||
{
|
||||
|
@ -47,7 +47,7 @@ bool AppDelegate::applicationDidFinishLaunching() {
|
|||
// android, windows, blackberry, linux or mac
|
||||
// use 960*640 resources as design resolution size
|
||||
CCFileUtils::sharedFileUtils()->setResourceDirectory("iphonehd");
|
||||
CCEGLView::sharedOpenGLView().setDesignResolutionSize(960, 640, kResolutionNoBorder);
|
||||
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(960, 640, kResolutionNoBorder);
|
||||
}
|
||||
|
||||
// turn on display FPS
|
||||
|
|
|
@ -41,7 +41,7 @@ bool HelloWorld::init()
|
|||
this,
|
||||
menu_selector(HelloWorld::menuCloseCallback));
|
||||
|
||||
if (CCApplication::sharedApplication().getTargetPlatform() == kTargetIphone)
|
||||
if (CCApplication::sharedApplication()->getTargetPlatform() == kTargetIphone)
|
||||
{
|
||||
pCloseItem->setPosition(ccp(visibleSize.width - 20 + origin.x, 20 + origin.y));
|
||||
}
|
||||
|
|
|
@ -30,23 +30,16 @@ done
|
|||
|
||||
# paths
|
||||
|
||||
if [ -z "${NDK_ROOT+aaa}" ]; then
|
||||
# ... if NDK_ROOT is not set, use "$HOME/bin/android-ndk"
|
||||
NDK_ROOT="$HOME/bin/android-ndk"
|
||||
if [ -z "${NDK_ROOT+aaa}" ];then
|
||||
echo "please define NDK_ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${COCOS2DX_ROOT+aaa}" ]; then
|
||||
# ... if COCOS2DX_ROOT is not set
|
||||
# ... find current working directory
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# ... use paths relative to current directory
|
||||
COCOS2DX_ROOT="$DIR/../../.."
|
||||
APP_ROOT="$DIR/.."
|
||||
APP_ANDROID_ROOT="$DIR"
|
||||
else
|
||||
APP_ROOT="$COCOS2DX_ROOT"/samples/"$APPNAME"
|
||||
APP_ANDROID_ROOT="$COCOS2DX_ROOT"/samples/"$APPNAME"/proj.android
|
||||
fi
|
||||
COCOS2DX_ROOT="$DIR/../../.."
|
||||
APP_ROOT="$DIR/.."
|
||||
APP_ANDROID_ROOT="$DIR"
|
||||
|
||||
echo "NDK_ROOT = $NDK_ROOT"
|
||||
echo "COCOS2DX_ROOT = $COCOS2DX_ROOT"
|
||||
|
|
|
@ -24,11 +24,11 @@ void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thi
|
|||
{
|
||||
if (!CCDirector::sharedDirector()->getOpenGLView())
|
||||
{
|
||||
CCEGLView *view = &CCEGLView::sharedOpenGLView();
|
||||
CCEGLView *view = CCEGLView::sharedOpenGLView();
|
||||
view->setFrameSize(w, h);
|
||||
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
CCApplication::sharedApplication().run();
|
||||
CCApplication::sharedApplication()->run();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -37,7 +37,6 @@ 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,10 +25,10 @@ int main(int argc, char **argv)
|
|||
height = 600;
|
||||
}
|
||||
|
||||
CCApplication::sharedApplication().setResourceRootPath("app/native/Resources/");
|
||||
CCApplication::sharedApplication()->setResourceRootPath("app/native/Resources/");
|
||||
|
||||
CCEGLView& eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView.setFrameSize(width, height);
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView->setFrameSize(width, height);
|
||||
|
||||
return CCApplication::sharedApplication().run();
|
||||
return CCApplication::sharedApplication()->run();
|
||||
}
|
||||
|
|
|
@ -62,7 +62,7 @@ static AppDelegate s_sharedApplication;
|
|||
|
||||
[[UIApplication sharedApplication] setStatusBarHidden: YES];
|
||||
|
||||
cocos2d::CCApplication::sharedApplication().run();
|
||||
cocos2d::CCApplication::sharedApplication()->run();
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -87,14 +87,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
cocos2d::CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
cocos2d::CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -35,7 +35,6 @@ STATICLIBS_DIR = ../../../cocos2dx/platform/third_party/linux/libraries
|
|||
endif
|
||||
STATICLIBS =
|
||||
STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \
|
||||
$(STATICLIBS_DIR)/libcurl.a \
|
||||
$(STATICLIBS_DIR)/libxml2.a \
|
||||
$(STATICLIBS_DIR)/libpng.a \
|
||||
$(STATICLIBS_DIR)/libjpeg.a \
|
||||
|
@ -44,7 +43,7 @@ STATICLIBS = $(STATICLIBS_DIR)/libfreetype.a \
|
|||
|
||||
|
||||
SHAREDLIBS = -L../../../lib/linux/Debug -lcocos2d -lrt -lz -lcocosdenshion -Wl,-rpath,../../../lib/linux/Debug/
|
||||
SHAREDLIBS += -lglfw
|
||||
SHAREDLIBS += -lglfw -lcurl
|
||||
SHAREDLIBS += -Wl,-rpath,../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib
|
||||
SHAREDLIBS += -L../../../cocos2dx/platform/third_party/linux/glew-1.7.0/glew-1.7.0/lib -lGLEW
|
||||
|
||||
|
|
|
@ -4,13 +4,32 @@
|
|||
#include "cocos2d.h"
|
||||
#include "CCEGLView.h"
|
||||
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#include <unistd.h>
|
||||
#include <string>
|
||||
|
||||
USING_NS_CC;
|
||||
|
||||
// 500 is enough?
|
||||
#define MAXPATHLEN 500
|
||||
|
||||
int main(int argc, char **argv)
|
||||
{
|
||||
// get application path
|
||||
int length;
|
||||
char fullpath[MAXPATHLEN];
|
||||
length = readlink("/proc/self/exe", fullpath, sizeof(fullpath));
|
||||
fullpath[length] = '\0';
|
||||
|
||||
std::string resourcePath = fullpath;
|
||||
resourcePath = resourcePath.substr(0, resourcePath.find_last_of("/"));
|
||||
resourcePath += "/../Resources/";
|
||||
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
CCApplication::sharedApplication().setResourceRootPath("../Resources/");
|
||||
CCEGLView& eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView.setFrameSize(960, 640);
|
||||
return CCApplication::sharedApplication().run();
|
||||
CCApplication::sharedApplication()->setResourceRootPath(resourcePath.c_str());
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView->setFrameSize(960, 640);
|
||||
return CCApplication::sharedApplication()->run();
|
||||
}
|
||||
|
|
|
@ -54,8 +54,7 @@ static AppDelegate s_sharedApplication;
|
|||
[window makeKeyAndOrderFront:self];
|
||||
[window setAcceptsMouseMovedEvents:NO];
|
||||
|
||||
// set cocos2d-x's opengl view
|
||||
cocos2d::CCApplication::sharedApplication().run();
|
||||
cocos2d::CCApplication::sharedApplication()->run();
|
||||
}
|
||||
|
||||
-(BOOL) applicationShouldTerminateAfterLastWindowClosed:(NSApplication*)theApplication
|
||||
|
|
|
@ -14,7 +14,7 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
|||
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
CCEGLView& eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView.setFrameSize(960, 640 );
|
||||
return CCApplication::sharedApplication().run();
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView->setFrameSize(960, 640 );
|
||||
return CCApplication::sharedApplication()->run();
|
||||
}
|
||||
|
|
|
@ -24,7 +24,9 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
{
|
||||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
||||
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()
|
||||
|
|
|
@ -30,23 +30,16 @@ done
|
|||
|
||||
# paths
|
||||
|
||||
if [ -z "${NDK_ROOT+aaa}" ]; then
|
||||
# ... if NDK_ROOT is not set, use "$HOME/bin/android-ndk"
|
||||
NDK_ROOT="$HOME/bin/android-ndk"
|
||||
if [ -z "${NDK_ROOT+aaa}" ];then
|
||||
echo "please define NDK_ROOT"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ -z "${COCOS2DX_ROOT+aaa}" ]; then
|
||||
# ... if COCOS2DX_ROOT is not set
|
||||
# ... find current working directory
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
|
||||
# ... use paths relative to current directory
|
||||
COCOS2DX_ROOT="$DIR/../../.."
|
||||
APP_ROOT="$DIR/.."
|
||||
APP_ANDROID_ROOT="$DIR"
|
||||
else
|
||||
APP_ROOT="$COCOS2DX_ROOT"/samples/"$APPNAME"
|
||||
APP_ANDROID_ROOT="$COCOS2DX_ROOT"/samples/"$APPNAME"/proj.android
|
||||
fi
|
||||
COCOS2DX_ROOT="$DIR/../../.."
|
||||
APP_ROOT="$DIR/.."
|
||||
APP_ANDROID_ROOT="$DIR"
|
||||
|
||||
echo "NDK_ROOT = $NDK_ROOT"
|
||||
echo "COCOS2DX_ROOT = $COCOS2DX_ROOT"
|
||||
|
|
|
@ -23,11 +23,11 @@ void Java_org_cocos2dx_lib_Cocos2dxRenderer_nativeInit(JNIEnv* env, jobject thi
|
|||
{
|
||||
if (!CCDirector::sharedDirector()->getOpenGLView())
|
||||
{
|
||||
CCEGLView *view = &CCEGLView::sharedOpenGLView();
|
||||
CCEGLView *view = CCEGLView::sharedOpenGLView();
|
||||
view->setFrameSize(w, h);
|
||||
|
||||
AppDelegate *pAppDelegate = new AppDelegate();
|
||||
CCApplication::sharedApplication().run();
|
||||
CCApplication::sharedApplication()->run();
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
|
@ -102,8 +102,6 @@ public class HelloLua extends Cocos2dxActivity{
|
|||
return (info.reqGlEsVersion >= 0x20000);
|
||||
}
|
||||
|
||||
private LuaGLSurfaceView mGLView;
|
||||
|
||||
|
||||
static {
|
||||
System.loadLibrary("hellolua");
|
||||
|
|
|
@ -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();
|
||||
}
|
|
@ -62,7 +62,7 @@ static AppDelegate s_sharedApplication;
|
|||
|
||||
[[UIApplication sharedApplication] setStatusBarHidden: YES];
|
||||
|
||||
cocos2d::CCApplication::sharedApplication().run();
|
||||
cocos2d::CCApplication::sharedApplication()->run();
|
||||
return YES;
|
||||
}
|
||||
|
||||
|
@ -87,14 +87,14 @@ static AppDelegate s_sharedApplication;
|
|||
Use this method to release shared resources, save user data, invalidate timers, and store enough application state information to restore your application to its current state in case it is terminated later.
|
||||
If your application supports background execution, called instead of applicationWillTerminate: when the user quits.
|
||||
*/
|
||||
cocos2d::CCApplication::sharedApplication().applicationDidEnterBackground();
|
||||
cocos2d::CCApplication::sharedApplication()->applicationDidEnterBackground();
|
||||
}
|
||||
|
||||
- (void)applicationWillEnterForeground:(UIApplication *)application {
|
||||
/*
|
||||
Called as part of transition from the background to the inactive state: here you can undo many of the changes made on entering the background.
|
||||
*/
|
||||
cocos2d::CCApplication::sharedApplication().applicationWillEnterForeground();
|
||||
cocos2d::CCApplication::sharedApplication()->applicationWillEnterForeground();
|
||||
}
|
||||
|
||||
- (void)applicationWillTerminate:(UIApplication *)application {
|
||||
|
|
|
@ -13,9 +13,6 @@
|
|||
15426A5B15B5722100712A7F /* CocosDenshion.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426A4815B5722100712A7F /* CocosDenshion.m */; };
|
||||
15426A5C15B5722100712A7F /* SimpleAudioEngine.mm in Sources */ = {isa = PBXBuildFile; fileRef = 15426A4915B5722100712A7F /* SimpleAudioEngine.mm */; };
|
||||
15426A5D15B5722100712A7F /* SimpleAudioEngine_objc.m in Sources */ = {isa = PBXBuildFile; fileRef = 15426A4B15B5722100712A7F /* SimpleAudioEngine_objc.m */; };
|
||||
15DD6D83156DD1EF003E7567 /* fps_images.png in Resources */ = {isa = PBXBuildFile; fileRef = 15DD6D81156DD1EF003E7567 /* fps_images.png */; };
|
||||
15F990C2159C0DED00848A44 /* fps_images-hd.png in Resources */ = {isa = PBXBuildFile; fileRef = 15F990C0159C0DED00848A44 /* fps_images-hd.png */; };
|
||||
15F990C3159C0DED00848A44 /* fps_images-ipadhd.png in Resources */ = {isa = PBXBuildFile; fileRef = 15F990C1159C0DED00848A44 /* fps_images-ipadhd.png */; };
|
||||
506EDB88102F4C4000A389B3 /* libz.dylib in Frameworks */ = {isa = PBXBuildFile; fileRef = 506EDB87102F4C4000A389B3 /* libz.dylib */; };
|
||||
506EDBA5102F4C9F00A389B3 /* AVFoundation.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 506EDBA4102F4C9F00A389B3 /* AVFoundation.framework */; };
|
||||
78947C6D14EBB9B100DBD5A6 /* background.mp3 in Resources */ = {isa = PBXBuildFile; fileRef = 78947C5E14EBB9B000DBD5A6 /* background.mp3 */; };
|
||||
|
@ -120,9 +117,6 @@
|
|||
15426A4915B5722100712A7F /* SimpleAudioEngine.mm */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.cpp.objcpp; path = SimpleAudioEngine.mm; sourceTree = "<group>"; };
|
||||
15426A4A15B5722100712A7F /* SimpleAudioEngine_objc.h */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.h; path = SimpleAudioEngine_objc.h; sourceTree = "<group>"; };
|
||||
15426A4B15B5722100712A7F /* SimpleAudioEngine_objc.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SimpleAudioEngine_objc.m; sourceTree = "<group>"; };
|
||||
15DD6D81156DD1EF003E7567 /* fps_images.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = fps_images.png; sourceTree = "<group>"; };
|
||||
15F990C0159C0DED00848A44 /* fps_images-hd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fps_images-hd.png"; sourceTree = "<group>"; };
|
||||
15F990C1159C0DED00848A44 /* fps_images-ipadhd.png */ = {isa = PBXFileReference; lastKnownFileType = image.png; path = "fps_images-ipadhd.png"; sourceTree = "<group>"; };
|
||||
1D6058910D05DD3D006BFB54 /* HelloLua.app */ = {isa = PBXFileReference; explicitFileType = wrapper.application; includeInIndex = 0; path = HelloLua.app; sourceTree = BUILT_PRODUCTS_DIR; };
|
||||
506EDB87102F4C4000A389B3 /* libz.dylib */ = {isa = PBXFileReference; lastKnownFileType = "compiled.mach-o.dylib"; name = libz.dylib; path = usr/lib/libz.dylib; sourceTree = SDKROOT; };
|
||||
506EDBA4102F4C9F00A389B3 /* AVFoundation.framework */ = {isa = PBXFileReference; lastKnownFileType = wrapper.framework; name = AVFoundation.framework; path = System/Library/Frameworks/AVFoundation.framework; sourceTree = SDKROOT; };
|
||||
|
@ -356,9 +350,6 @@
|
|||
D4EF94DA15BD311E00D803EB /* Icon-72.png */,
|
||||
D4EF94D815BD311A00D803EB /* Icon-114.png */,
|
||||
D4EF94D615BD311700D803EB /* Icon-57.png */,
|
||||
15F990C0159C0DED00848A44 /* fps_images-hd.png */,
|
||||
15F990C1159C0DED00848A44 /* fps_images-ipadhd.png */,
|
||||
15DD6D81156DD1EF003E7567 /* fps_images.png */,
|
||||
78947C5E14EBB9B000DBD5A6 /* background.mp3 */,
|
||||
78947C5F14EBB9B000DBD5A6 /* crop.png */,
|
||||
78DC4C9815490B9500317402 /* Default.png */,
|
||||
|
@ -591,9 +582,6 @@
|
|||
78947C7814EBB9B100DBD5A6 /* menu1.png in Resources */,
|
||||
78947C7914EBB9B100DBD5A6 /* menu2.png in Resources */,
|
||||
78DC4C9A15490B9500317402 /* Default.png in Resources */,
|
||||
15DD6D83156DD1EF003E7567 /* fps_images.png in Resources */,
|
||||
15F990C2159C0DED00848A44 /* fps_images-hd.png in Resources */,
|
||||
15F990C3159C0DED00848A44 /* fps_images-ipadhd.png in Resources */,
|
||||
F2837A6C15B9606900A5707B /* Android.mk in Resources */,
|
||||
F2837A6D15B9606900A5707B /* liblua.vcproj in Resources */,
|
||||
D4EF94D715BD311700D803EB /* Icon-57.png in Resources */,
|
||||
|
|
|
@ -24,9 +24,9 @@ int APIENTRY _tWinMain(HINSTANCE hInstance,
|
|||
|
||||
// create the application instance
|
||||
AppDelegate app;
|
||||
CCEGLView& eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView.setFrameSize(480, 320);
|
||||
int ret = CCApplication::sharedApplication().run();
|
||||
CCEGLView* eglView = CCEGLView::sharedOpenGLView();
|
||||
eglView->setFrameSize(480, 320);
|
||||
int ret = CCApplication::sharedApplication()->run();
|
||||
|
||||
#ifdef USE_WIN32_CONSOLE
|
||||
FreeConsole();
|
||||
|
|
|
@ -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 \
|
||||
|
|
|
@ -20,10 +20,34 @@ bool AppDelegate::applicationDidFinishLaunching()
|
|||
{
|
||||
// initialize director
|
||||
CCDirector *pDirector = CCDirector::sharedDirector();
|
||||
pDirector->setOpenGLView(&CCEGLView::sharedOpenGLView());
|
||||
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);
|
||||
|
|
|
@ -10,7 +10,7 @@ CurrentLanguageTest::CurrentLanguageTest()
|
|||
CCLabelTTF *labelLanguage = CCLabelTTF::create("", "Arial", 20);
|
||||
labelLanguage->setPosition(ccp(s.width/2, s.height/2));
|
||||
|
||||
ccLanguageType currentLanguageType = CCApplication::sharedApplication().getCurrentLanguage();
|
||||
ccLanguageType currentLanguageType = CCApplication::sharedApplication()->getCurrentLanguage();
|
||||
switch (currentLanguageType)
|
||||
{
|
||||
case kLanguageEnglish:
|
||||
|
|
|
@ -15,8 +15,8 @@ USING_NS_CC_EXT;
|
|||
|
||||
EditBoxTest::EditBoxTest()
|
||||
{
|
||||
CCPoint visibleOrigin = CCEGLView::sharedOpenGLView().getVisibleOrigin();
|
||||
CCSize visibleSize = CCEGLView::sharedOpenGLView().getVisibleSize();
|
||||
CCPoint visibleOrigin = CCEGLView::sharedOpenGLView()->getVisibleOrigin();
|
||||
CCSize visibleSize = CCEGLView::sharedOpenGLView()->getVisibleSize();
|
||||
|
||||
CCSprite* pBg = CCSprite::create("Images/HelloWorld.png");
|
||||
pBg->setPosition(ccp(visibleOrigin.x+visibleSize.width/2, visibleOrigin.y+visibleSize.height/2));
|
||||
|
@ -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();
|
||||
|
|
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue