From cd4014f86af70e3fa418e2ea5ba73a22fcf3e693 Mon Sep 17 00:00:00 2001 From: Anuken Date: Wed, 9 Aug 2017 14:59:31 -0400 Subject: [PATCH] Fixed Eclipse generating pointless warnings about facets --- android/AndroidManifest.xml | 4 ++-- android/build.gradle | 4 +++- .../io/anuke/mindustry/AndroidLauncher.java | 3 ++- build.gradle | 4 +++- core/assets/sprites/back-web.png | Bin 0 -> 2459 bytes core/src/io/anuke/mindustry/UI.java | 8 +++++-- html/build.gradle | 21 ++++++------------ .../io/anuke/mindustry/GdxDefinition.gwt.xml | 1 - 8 files changed, 23 insertions(+), 22 deletions(-) create mode 100644 core/assets/sprites/back-web.png 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 0000000000000000000000000000000000000000..d550bab49289ad875aa90cede0dc202703effe8b GIT binary patch literal 2459 zcmeAS@N?(olHy`uVBq!ia0y~yU}ykg4mJh`hQoG=rx_R+I14-?iy0WWg+Z8+Vb&Z8 z1_lQ95>H=O_JEaktaqDfY^`tvy0&kZ}ta_33$j4Ou!n}m6 zsa7|ceHNwgFWCHp%kLY*Y>lbi>Jjr3PR$gW7U36Ll;l%r;r!_G-(9meyKIVPesoyv z!hz}+d3S7WZT~Lmxw1`HQ1EMQ{1pAb<3VR<1Z@ss+W zEO9tdzw%$zpT|EGSN4~zJ@?W0PR&|JGj;iu{}w-yU%mgFWbB-lSu7J|4J*| z&mV8>c=5%YXVSLZm;L+yS=QDl?YbbA_(9=H{hMY_ZryA9O7?B3nRe>FZ{maL?fmKT zpJsXW=UVXXerA&4HLY{$ADM%SL2GLB_O;a zZ)Reru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Y%N`}0@ z+iUcb&Tf6}{+o5lv&FCWf2|gLEi*M)vj6_9^c`2L1@Fu7Kd?P8C0Z`w?9bTif!9mF z{QBipdw>4F=|>)BZx#1=#CYwQz5U-GE-t>8FZ})c_vQCQi6a#}dj3f-zZaBpKA88t z`26mRKVz?7tlMuMt+wQkoXW3=Gt3p==gU85FO{#m{r-E-R$W7m2{ukyUe6dO2(Zt* zUn*9e*E}x$-l$*4LojbTk1dGZstdsTXnpT>KNy=UHsZ_ zUR|tJpXuEC%+ltEX~z%N1?H_w3rx;@`dIAvxBdR_earLj@0ZwpEql{p0MEh z4^|H0jfFq8!rv}Bf2a7heEx@J%*ip~3+mVN3h;YJz4;rw)jRJeII)!;|M~e4^P12) z&*hDm%D!H*X*A(iSa?tO>GaF{->4oq{WiR~^E7io;l8bZihhUJ;N&D5hFkUV zkEd;z67u|<4gdAczVjb`Vvzdx+v8`!ukfcm8mGA@JpXn4DdUzu-vd8A{I>qmk)IrM zbdEB6{CppMa{ZS2{6qQ*?dlbqZ5qPooLXz&s=lN3H=oz*`KH{@^SZniT)YzIcgVx! z&;L)KiW23_VxI@!)~}TB`?KWtb`ECUKhG!r`@8VnhmXetHk1UnUlEJ>`Q+QdH}@R4 zWomoXA7trf%bcIO|J2^bYZg|m>JR1}kA7IO?$5*TY*EMgId<6dH0@lRkoSjqb+!1; zPwPE2Dvw@VY2&!2mVYC!#oybHm~&2=^B*{RFnj;?3tj9hEM6sN20zk_t2?>uRPY?f rl>ge952HS?+^IQx^G&b%PyWfBVY?rgTe~DWM4fLx>F3 literal 0 HcmV?d00001 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 @@ -