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 zcmV;M31s$(P)5_5hnGm5V1>pJ2+F5|&s_U2ZrnXRJ^iGN)V3`V5%qmvlrK@oQa-Y7O&Mv`T~7+~A*qjatWdXA8Si#sS0Z0`|$^TdH8Vl@xC8_5E0Q~ z*U(|toaKLc_;7k|njijOQiCxynwuX}pWJ+O|E=;XBBHOuJ0ha9+5UBSN6*KBi0Je; z43f5O>5squIemO0y3iJ3@F3KG?1M=QE!MttzO;On%HK_4;FpIFXCLyKN{?+g4!hcgYuvsAu1?3%M#|9l)S)c5moINK0T z*Z8T{IP4nw{PF!P_U!xq)R|a*>bkEnBM}=-w0vUa>*wP@VGu0s1%g_CKK5q=;WSwO z&;PCY_hNu(;rumo4d}kjmA@-F3&`D|R|6&Q4RxHf}O!pSjI2euNx$Se8S?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njPwBPUQCU9xQGxq6#CQxYPh#o!aCHgbp7(RlyV3bw*U^5zH(Ms8{2nCwSj+=>_n#l<2X!BQ z+wb>mwJk9SkUTCS)S0T?`h*Yo_4 z7u5Xt^^Z4ub1HvnLxtu!Joq(;_ywRhg{5#b%<}PbLH&o{`@W}d-@cjh9M*mf zS$+XIBiG`*JIwl!7uNpiOqs$!EuMq>{z!WbvG@S!d-vwbcU^Zj>-YQp1wq24X!m(#!OCBVz=S96KW18{M^wfu7XSA1`v$Kc75JOJ8% zU*ndrlvL-=JP+5iO`qZN02==LNcnL3SLKW-%L|a_`p4w~wEXu`^5OQc(!}`)oGiry zNcrzu$*;73Z^ADihbMTmJb+i6%B??zC%A?C4od5vH4Eo%ib|l-)K*TyNHqNa^73+F z9yVR)Q`;|jACCN_`?m-KE&S(^{{5lu@bSk`uyj+0)D~R%at9uu@@~=oJdBxGGJVC5| z53vn6{oCRLY{@qdz{SC9zt_-;2dFseV`)?3DPDfbrpi;CL1h0cY2jM%1l)Yh+3bxc Z`45wcR=eYc*W>^I002ovPDHLkV1h%44AlSt 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 @@ -