Browse Source

ox-move version

[email protected] 7 years ago
parent
commit
f09b52cf5b

+ 2 - 0
.gitignore

@@ -26,3 +26,5 @@ my_awesome_game/project/proj.win32/Release_v141/
 my_awesome_game/project/proj.win32/Debug_v141/
 my_awesome_game/project/proj.win32/.vs/
 my_awesome_game/project/Debug_v141/
+my_awesome_game/project/proj.win32/MyAwesomeGame.VC.VC.opendb
+my_awesome_game/project/proj.android/.externalNativeBuild/

+ 1 - 1
SDL

@@ -1 +1 @@
-Subproject commit b1f73350286c1eb160a6f2080d415cbfeacc1349
+Subproject commit 8e9881eaf285ff25187158d51bc19077c52d4ccc

+ 1 - 1
my_awesome_game/project/proj.android/build-run.bat

@@ -1,4 +1,4 @@
-call ndk-build NDK_MODULE_PATH="../../../"
+rem call ndk-build NDK_MODULE_PATH="../../../"
 call gradlew assembleDebug
 call adb install -r build/outputs/apk/proj.android-debug.apk
 call adb shell am start -n org.oxygine.MyAwesomeGame/org.oxygine.MyAwesomeGame.MainActivity

+ 2 - 2
my_awesome_game/project/proj.android/build-run.sh

@@ -1,6 +1,6 @@
 #!/usr/bin/env sh
 
-ndk-build NDK_MODULE_PATH="../../../../"
-gradlew assembleDebug
+#ndk-build NDK_MODULE_PATH="../../../../"
+./gradlew assembleDebug
 adb install -r build/outputs/apk/proj.android-debug.apk
 adb shell am start -n org.oxygine.MyAwesomeGame/org.oxygine.MyAwesomeGame.MainActivity

+ 24 - 7
my_awesome_game/project/proj.android/build.gradle

@@ -3,9 +3,10 @@ buildscript {
         mavenLocal()
         mavenCentral()
         jcenter()
+        google()
     }
     dependencies {
-        classpath 'com.android.tools.build:gradle:2.2.+'
+        classpath 'com.android.tools.build:gradle:3.0.1'
     }
 }
 
@@ -14,15 +15,13 @@ apply plugin: 'com.android.application'
 
 
 dependencies {
-    compile(project(':oxygine-extension'))
-    compile(project(':oxygine-lib')) { exclude module: 'oxygine-extension' }
+    implementation(project(':oxygine-extension'))
+    implementation(project(':oxygine-lib')) { exclude module: 'oxygine-extension' }
 }
 
 android {
-    enforceUniquePackageName=false
         
     compileSdkVersion 23
-    buildToolsVersion '23.0.2'
 
 
     sourceSets {
@@ -31,12 +30,30 @@ android {
             manifest.srcFile 'AndroidManifest.xml'
             java.srcDirs = ['src']
             res.srcDirs = ['res']
-            assets.srcDirs = ['../../data']
+            assets.srcDirs = ['../data']
+        }
+    }
+
+    defaultConfig {
+        ndk {
+            abiFilters 'armeabi-v7a'//, 'arm64-v8a'
+        }
+
+        externalNativeBuild {
+            ndkBuild {
+                arguments 'NDK_MODULE_PATH+=../../../'
+            }
+        }
+    }
+
+    externalNativeBuild {
+        ndkBuild {
+            path 'jni/Android.mk'
         }
     }
 
     aaptOptions {
         noCompress 'zip', 'ogg'
-        ignoreAssetsPattern "!*.dll:*.icf"
+        ignoreAssetsPattern "!*.dll"
     }
 }

+ 2 - 2
my_awesome_game/project/proj.android/gradle/wrapper/gradle-wrapper.properties

@@ -1,6 +1,6 @@
-#Fri Feb 03 15:44:28 YEKT 2017
+#Wed Nov 01 12:35:02 YEKT 2017
 distributionBase=GRADLE_USER_HOME
 distributionPath=wrapper/dists
 zipStoreBase=GRADLE_USER_HOME
 zipStorePath=wrapper/dists
-distributionUrl=https\://services.gradle.org/distributions/gradle-2.14.1-bin.zip
+distributionUrl=https\://services.gradle.org/distributions/gradle-4.1-all.zip

+ 164 - 0
my_awesome_game/project/proj.android/gradlew

@@ -0,0 +1,164 @@
+#!/usr/bin/env bash
+
+##############################################################################
+##
+##  Gradle start up script for UN*X
+##
+##############################################################################
+
+# Attempt to set APP_HOME
+# Resolve links: $0 may be a link
+PRG="$0"
+# Need this for relative symlinks.
+while [ -h "$PRG" ] ; do
+    ls=`ls -ld "$PRG"`
+    link=`expr "$ls" : '.*-> \(.*\)$'`
+    if expr "$link" : '/.*' > /dev/null; then
+        PRG="$link"
+    else
+        PRG=`dirname "$PRG"`"/$link"
+    fi
+done
+SAVED="`pwd`"
+cd "`dirname \"$PRG\"`/" >/dev/null
+APP_HOME="`pwd -P`"
+cd "$SAVED" >/dev/null
+
+APP_NAME="Gradle"
+APP_BASE_NAME=`basename "$0"`
+
+# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
+DEFAULT_JVM_OPTS=""
+
+# Use the maximum available, or set MAX_FD != -1 to use that value.
+MAX_FD="maximum"
+
+warn ( ) {
+    echo "$*"
+}
+
+die ( ) {
+    echo
+    echo "$*"
+    echo
+    exit 1
+}
+
+# OS specific support (must be 'true' or 'false').
+cygwin=false
+msys=false
+darwin=false
+nonstop=false
+case "`uname`" in
+  CYGWIN* )
+    cygwin=true
+    ;;
+  Darwin* )
+    darwin=true
+    ;;
+  MINGW* )
+    msys=true
+    ;;
+  NONSTOP* )
+    nonstop=true
+    ;;
+esac
+
+CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
+
+# Determine the Java command to use to start the JVM.
+if [ -n "$JAVA_HOME" ] ; then
+    if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
+        # IBM's JDK on AIX uses strange locations for the executables
+        JAVACMD="$JAVA_HOME/jre/sh/java"
+    else
+        JAVACMD="$JAVA_HOME/bin/java"
+    fi
+    if [ ! -x "$JAVACMD" ] ; then
+        die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+    fi
+else
+    JAVACMD="java"
+    which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
+
+Please set the JAVA_HOME variable in your environment to match the
+location of your Java installation."
+fi
+
+# Increase the maximum file descriptors if we can.
+if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then
+    MAX_FD_LIMIT=`ulimit -H -n`
+    if [ $? -eq 0 ] ; then
+        if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then
+            MAX_FD="$MAX_FD_LIMIT"
+        fi
+        ulimit -n $MAX_FD
+        if [ $? -ne 0 ] ; then
+            warn "Could not set maximum file descriptor limit: $MAX_FD"
+        fi
+    else
+        warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT"
+    fi
+fi
+
+# For Darwin, add options to specify how the application appears in the dock
+if $darwin; then
+    GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
+fi
+
+# For Cygwin, switch paths to Windows format before running java
+if $cygwin ; then
+    APP_HOME=`cygpath --path --mixed "$APP_HOME"`
+    CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
+    JAVACMD=`cygpath --unix "$JAVACMD"`
+
+    # We build the pattern for arguments to be converted via cygpath
+    ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
+    SEP=""
+    for dir in $ROOTDIRSRAW ; do
+        ROOTDIRS="$ROOTDIRS$SEP$dir"
+        SEP="|"
+    done
+    OURCYGPATTERN="(^($ROOTDIRS))"
+    # Add a user-defined pattern to the cygpath arguments
+    if [ "$GRADLE_CYGPATTERN" != "" ] ; then
+        OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
+    fi
+    # Now convert the arguments - kludge to limit ourselves to /bin/sh
+    i=0
+    for arg in "$@" ; do
+        CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
+        CHECK2=`echo "$arg"|egrep -c "^-"`                                 ### Determine if an option
+
+        if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then                    ### Added a condition
+            eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
+        else
+            eval `echo args$i`="\"$arg\""
+        fi
+        i=$((i+1))
+    done
+    case $i in
+        (0) set -- ;;
+        (1) set -- "$args0" ;;
+        (2) set -- "$args0" "$args1" ;;
+        (3) set -- "$args0" "$args1" "$args2" ;;
+        (4) set -- "$args0" "$args1" "$args2" "$args3" ;;
+        (5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
+        (6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
+        (7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
+        (8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
+        (9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
+    esac
+fi
+
+# Split up the JVM_OPTS And GRADLE_OPTS values into an array, following the shell quoting and substitution rules
+function splitJvmOpts() {
+    JVM_OPTS=("$@")
+}
+eval splitJvmOpts $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS
+JVM_OPTS[${#JVM_OPTS[*]}]="-Dorg.gradle.appname=$APP_BASE_NAME"
+
+exec "$JAVACMD" "${JVM_OPTS[@]}" -classpath "$CLASSPATH" org.gradle.wrapper.GradleWrapperMain "$@"

+ 0 - 2
my_awesome_game/project/src/MainMenuScene.cpp

@@ -1,6 +1,4 @@
 #include "MainMenuScene.h"
-#include "Sprite.h"
-#include "initActor.h"
 #include "res.h"
 #include "MyButton.h"
 #include "GameScene.h"

+ 5 - 17
my_awesome_game/project/src/main.cpp

@@ -4,9 +4,9 @@
     If you just started here and don't understand the code completely, feel free to come back later.
     You can start from example.cpp and example.h, which main functions are called from here.
 */
-#include "core/oxygine.h"
-#include "Stage.h"
-#include "DebugActor.h"
+#include "ox/oxygine.hpp"
+#include "ox/Stage.hpp"
+#include "ox/DebugActor.hpp"
 #include "example.h"
 
 
@@ -50,12 +50,9 @@ void run()
     core::init_desc desc;
     desc.title = "Oxygine Application";
 
-#if OXYGINE_SDL || OXYGINE_EMSCRIPTEN
-    // The initial window size can be set up here on SDL builds
+    // The initial window size can be set up here on SDL builds, ignored on Mobile devices
     desc.w = 960;
     desc.h = 640;
-    // Marmalade settings can be modified from the emulator's menu
-#endif
 
 
     example_preinit();
@@ -63,7 +60,7 @@ void run()
 
 
     // Create the stage. Stage is a root node for all updateable and drawable objects
-    Stage::instance = new Stage(true);
+    Stage::instance = new Stage();
     Point size = core::getDisplaySize();
     getStage()->setSize(size);
 
@@ -125,15 +122,6 @@ void run()
     //end
 }
 
-#ifdef __S3E__
-int main(int argc, char* argv[])
-{
-    run();
-    return 0;
-}
-#endif
-
-
 #ifdef OXYGINE_SDL
 
 #include "SDL_main.h"

+ 1 - 1
oxygine-flow

@@ -1 +1 @@
-Subproject commit 545ef2467452f8ed3fa3b19d63a5cc10e29b8ede
+Subproject commit 4327dc9564fca2204940de99862f0357170c6a89

+ 1 - 1
oxygine-framework

@@ -1 +1 @@
-Subproject commit 1446b38a2d15ff6dee5694cbbc8b39cbeaa5e36a
+Subproject commit 9b5d98ae28df0ae740710db4a0c62d06c8f7c9cc

+ 1 - 1
oxygine-freetype

@@ -1 +1 @@
-Subproject commit f67a9329d369ac05c611ec280d19221fa7c27178
+Subproject commit 5d3065bec743ec2abc976338fc5e1857fe4db55d

+ 1 - 1
oxygine-sound

@@ -1 +1 @@
-Subproject commit 29ac12876ae634b002871e6e300ba9994c95ba87
+Subproject commit b3775ff0df3cb785858b265de0454f4b744fc917