diff --git a/android/AndroidManifest.xml b/android/AndroidManifest.xml index 107558455e..0cd1646586 100644 --- a/android/AndroidManifest.xml +++ b/android/AndroidManifest.xml @@ -1,8 +1,8 @@ + android:versionCode="5" + android:versionName="1.1.1" > diff --git a/android/build.gradle b/android/build.gradle index 42499f5ed1..413b869046 100644 --- a/android/build.gradle +++ b/android/build.gradle @@ -8,7 +8,7 @@ android { aidl.srcDirs = ['src'] renderscript.srcDirs = ['src'] res.srcDirs = ['res'] - assets.srcDirs = ['assets'] + assets.srcDirs = ['assets', 'src/main/assets', '../core/assets/'] jniLibs.srcDirs = ['libs'] } @@ -131,5 +131,7 @@ idea { } } } + dependencies { + //compile files('lib/ucore.jar') } \ No newline at end of file diff --git a/android/src/io/anuke/mindustry/AndroidLauncher.java b/android/src/io/anuke/mindustry/AndroidLauncher.java index 73be0c1675..f847e53a79 100644 --- a/android/src/io/anuke/mindustry/AndroidLauncher.java +++ b/android/src/io/anuke/mindustry/AndroidLauncher.java @@ -2,6 +2,7 @@ package io.anuke.mindustry; import java.text.SimpleDateFormat; import java.util.Date; +import java.util.Locale; import com.badlogic.gdx.backends.android.AndroidApplication; import com.badlogic.gdx.backends.android.AndroidApplicationConfiguration; @@ -18,7 +19,7 @@ public class AndroidLauncher extends AndroidApplication { config.useImmersiveMode = true; SaveIO.setFormatProvider(new FormatProvider(){ - SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss"); + SimpleDateFormat format = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss", Locale.ENGLISH); public String format(Date date){ return format.format(date); diff --git a/build.gradle b/build.gradle index 7f86325d1e..bb3a6ddfc5 100644 --- a/build.gradle +++ b/build.gradle @@ -50,6 +50,7 @@ project(":html") { dependencies { compile project(":core") + compile fileTree(dir: '../core/lib', include: '*.jar') compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion" compile "com.badlogicgames.gdx:gdx:$gdxVersion:sources" compile "com.badlogicgames.gdx:gdx-backend-gwt:$gdxVersion:sources" @@ -78,7 +79,8 @@ project(":core") { apply plugin: "java" dependencies { - compile fileTree(dir: '../core/lib', include: '*.jar') + //compile fileTree(dir: '../core/lib', include: '*.jar') + compile 'com.github.anuken:ucore:b8222ac95e' compile "com.badlogicgames.gdx:gdx:$gdxVersion" compile "com.badlogicgames.gdx:gdx-ai:1.8.1" } diff --git a/core/assets/sprites/back-web.png b/core/assets/sprites/back-web.png new file mode 100644 index 0000000000..d550bab492 Binary files /dev/null and b/core/assets/sprites/back-web.png differ diff --git a/core/src/io/anuke/mindustry/UI.java b/core/src/io/anuke/mindustry/UI.java index 4969d1c92f..94e473c190 100644 --- a/core/src/io/anuke/mindustry/UI.java +++ b/core/src/io/anuke/mindustry/UI.java @@ -6,6 +6,7 @@ import static io.anuke.ucore.scene.actions.Actions.*; import com.badlogic.gdx.Application.ApplicationType; import com.badlogic.gdx.Gdx; import com.badlogic.gdx.graphics.Color; +import com.badlogic.gdx.graphics.Texture; import com.badlogic.gdx.graphics.g2d.Batch; import com.badlogic.gdx.math.Interpolation; import com.badlogic.gdx.utils.Align; @@ -62,7 +63,7 @@ public class UI extends SceneModule{ Dialog.closePadT = 4; Textures.load("sprites/"); - Textures.repeatWrap("conveyort", "back"); + Textures.repeatWrap("conveyort", Gdx.app.getType() == ApplicationType.WebGL ? "back-web" : "back"); } void drawBackground(){ @@ -78,7 +79,10 @@ public class UI extends SceneModule{ float scale = Unit.dp.inPixels(1f); - batch.draw(Textures.get("back"), 0, 0, w, h, 0, 0, (float)w/h/scale * h/Textures.get("back").getHeight()/4f, -1f/scale * h/Textures.get("back").getHeight()/4f); + Texture texture = Textures.get(Gdx.app.getType() == ApplicationType.WebGL ? "back-web" : "back"); + + batch.draw(texture, + 0, 0, w, h, 0, 0, (float)w/h/scale * h/texture.getHeight()/4f, -1f/scale * h/texture.getHeight()/4f); for(int x = 0; x < tw; x ++){ float offset = (Timers.time()*2*(x%2-0.5f))/32f; diff --git a/html/build.gradle b/html/build.gradle index 3a564c47a6..ad8a76d92e 100644 --- a/html/build.gradle +++ b/html/build.gradle @@ -18,20 +18,6 @@ gwt { } } -task draftRun(type: JettyRunWar) { - dependsOn draftWar - dependsOn.remove('war') - webApp=draftWar.archivePath - daemon=true -} - -task superDev(type: de.richsource.gradle.plugins.gwt.GwtSuperDev) { - dependsOn draftRun - doFirst { - gwt.modules = gwt.devModules - } -} - task dist(dependsOn: [clean, compileGwt]) { doLast { file("build/dist").mkdirs() @@ -56,6 +42,13 @@ task distZip(type: Zip, dependsOn: dist){ destinationDir(file("build/dist-zipped")) } + +eclipseWtpFacet.doLast{ + delete{ + delete '.settings/org.eclipse.wst.common.project.facet.core.xml' + } +} + draftWar { from "war" } diff --git a/html/src/io/anuke/mindustry/GdxDefinition.gwt.xml b/html/src/io/anuke/mindustry/GdxDefinition.gwt.xml index 5744fc9945..9d3c59ebcc 100644 --- a/html/src/io/anuke/mindustry/GdxDefinition.gwt.xml +++ b/html/src/io/anuke/mindustry/GdxDefinition.gwt.xml @@ -6,7 +6,6 @@ -