Merge pull request #6016 from samuele3hu/develop_test

Modify lua project setting and replace NativeActivity with Cocos2dActivity
This commit is contained in:
James Chen 2014-03-27 11:29:55 +08:00
commit b028c29a7d
8 changed files with 16 additions and 68 deletions

View File

@ -10,7 +10,7 @@
<application android:label="@string/app_name"
android:icon="@drawable/icon">
<activity android:name=".Cocos2dxActivity"
<activity android:name=".AppActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

View File

@ -9,7 +9,7 @@
using namespace cocos2d;
void cocos_android_app_init (struct android_app* app) {
void cocos_android_app_init (JNIEnv* env, jobject thiz) {
LOGD("cocos_android_app_init");
AppDelegate *pAppDelegate = new AppDelegate();
}

View File

@ -0,0 +1,6 @@
package org.cocos2dx.lua_empty_test;
import org.cocos2dx.lib.Cocos2dxActivity;
public class AppActivity extends Cocos2dxActivity {
}

View File

@ -1,32 +0,0 @@
package org.cocos2dx.lua_empty_test;
import android.app.NativeActivity;
import android.os.Bundle;
public class Cocos2dxActivity extends NativeActivity {
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//For supports translucency
//1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp
/*const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
//EGL_BLUE_SIZE, 5, -->delete
//EGL_GREEN_SIZE, 6, -->delete
//EGL_RED_SIZE, 5, -->delete
EGL_BUFFER_SIZE, 32, //-->new field
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 8,
EGL_NONE
};*/
//2.Set the format of window
// getWindow().setFormat(PixelFormat.TRANSLUCENT);
}
}

View File

@ -11,7 +11,7 @@
<application android:label="@string/app_name"
android:icon="@drawable/icon">
<activity android:name=".Cocos2dxActivity"
<activity android:name=".AppActivity"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"

View File

@ -10,7 +10,7 @@
using namespace cocos2d;
void cocos_android_app_init (struct android_app* app) {
void cocos_android_app_init (JNIEnv* env, jobject thiz) {
LOGD("cocos_android_app_init");
AppDelegate *pAppDelegate = new AppDelegate();
}

View File

@ -0,0 +1,6 @@
package org.cocos2dx.lua_tests;
import org.cocos2dx.lib.Cocos2dxActivity;
public class AppActivity extends Cocos2dxActivity{
}

View File

@ -1,32 +0,0 @@
package org.cocos2dx.lua_tests;
import android.app.NativeActivity;
import android.os.Bundle;
public class Cocos2dxActivity extends NativeActivity{
@Override
protected void onCreate(Bundle savedInstanceState) {
// TODO Auto-generated method stub
super.onCreate(savedInstanceState);
//For supports translucency
//1.change "attribs" in cocos\2d\platform\android\nativeactivity.cpp
/*const EGLint attribs[] = {
EGL_SURFACE_TYPE, EGL_WINDOW_BIT,
EGL_RENDERABLE_TYPE, EGL_OPENGL_ES2_BIT,
//EGL_BLUE_SIZE, 5, -->delete
//EGL_GREEN_SIZE, 6, -->delete
//EGL_RED_SIZE, 5, -->delete
EGL_BUFFER_SIZE, 32, //-->new field
EGL_DEPTH_SIZE, 16,
EGL_STENCIL_SIZE, 8,
EGL_NONE
};*/
//2.Set the format of window
// getWindow().setFormat(PixelFormat.TRANSLUCENT);
}
}