issue #1469: Made MoonWarriors works on android.

This commit is contained in:
James Chen 2012-10-10 15:06:11 +08:00
parent d03ff0616a
commit 5054684e00
6 changed files with 8 additions and 15 deletions

View File

@ -24,7 +24,7 @@ bool AppDelegate::applicationDidFinishLaunching()
// initialize director
CCDirector *pDirector = CCDirector::sharedDirector();
pDirector->setOpenGLView(CCEGLView::sharedOpenGLView());
CCEGLView::sharedOpenGLView()->setDesignResolutionSize(320, 480, kResolutionShowAll);
// enable High Resource Mode(2x, such as iphone4) and maintains low resource on other devices.
// pDirector->enableRetinaDisplay(true);

View File

@ -30,11 +30,4 @@
<nature>com.android.ide.eclipse.adt.AndroidNature</nature>
<nature>org.eclipse.jdt.core.javanature</nature>
</natures>
<linkedResources>
<link>
<name>src_common</name>
<type>2</type>
<locationURI>PARENT-3-PROJECT_LOC/cocos2dx/platform/android/java/src_common</locationURI>
</link>
</linkedResources>
</projectDescription>

View File

@ -1,6 +1,6 @@
<?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="org.cocos2dx.testjavascript"
package="org.cocos2dx.moonwarriors"
android:versionCode="1"
android:versionName="1.0">
@ -12,7 +12,7 @@
<activity android:name=".MoonWarriors"
android:label="@string/app_name"
android:screenOrientation="landscape"
android:screenOrientation="portrait"
android:theme="@android:style/Theme.NoTitleBar.Fullscreen"
android:configChanges="orientation">
<intent-filter>

View File

@ -2,11 +2,11 @@ LOCAL_PATH := $(call my-dir)
include $(CLEAR_VARS)
LOCAL_MODULE := test_javascript_shared
LOCAL_MODULE := moonwarriors_shared
LOCAL_MODULE_FILENAME := libtestjavascript
LOCAL_MODULE_FILENAME := libmoonwarriors
LOCAL_SRC_FILES := testjavascript/main.cpp \
LOCAL_SRC_FILES := moonwarriors/main.cpp \
../../Classes/AppDelegate.cpp
LOCAL_C_INCLUDES := $(LOCAL_PATH)/../../Classes

View File

@ -21,7 +21,7 @@ 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.
****************************************************************************/
package org.cocos2dx.testjavascript;
package org.cocos2dx.moonwarriors;
import org.cocos2dx.lib.Cocos2dxActivity;
@ -34,6 +34,6 @@ public class MoonWarriors extends Cocos2dxActivity{
}
static {
System.loadLibrary("testjavascript");
System.loadLibrary("moonwarriors");
}
}