Fixed all GWT errors, released new version

This commit is contained in:
Anuken
2017-12-24 14:40:08 -05:00
parent ea63451f49
commit c69779bf7e
9 changed files with 22 additions and 12 deletions

View File

@@ -1,8 +1,8 @@
<?xml version="1.0" encoding="utf-8"?> <?xml version="1.0" encoding="utf-8"?>
<manifest xmlns:android="http://schemas.android.com/apk/res/android" <manifest xmlns:android="http://schemas.android.com/apk/res/android"
package="io.anuke.mindustry" package="io.anuke.mindustry"
android:versionCode="44" android:versionCode="45"
android:versionName="3.2b3" > android:versionName="3.2b4" >
<uses-permission android:name="com.android.vending.BILLING" /> <uses-permission android:name="com.android.vending.BILLING" />
<uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" /> <uses-permission android:name="android.permission.WRITE_EXTERNAL_STORAGE" />

View File

@@ -21,7 +21,7 @@ allprojects {
appName = "Mindustry" appName = "Mindustry"
gdxVersion = '1.9.8' gdxVersion = '1.9.8'
aiVersion = '1.8.1' aiVersion = '1.8.1'
uCoreVersion = '9217329ccb'; uCoreVersion = 'c3176395de';
} }
repositories { repositories {

View File

@@ -5,4 +5,6 @@
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.entities.enemies" /> <extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.entities.enemies" />
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Tile" /> <extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Tile" />
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Maps" /> <extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Maps" />
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.world.Map" />
<extend-configuration-property name="gdx.reflect.include" value="io.anuke.mindustry.entities.EnemySpawn" />
</module> </module>

View File

@@ -77,6 +77,8 @@ public class Control extends Module{
if(Mindustry.args.contains("-debug", false)) if(Mindustry.args.contains("-debug", false))
Vars.debug = true; Vars.debug = true;
Inputs.useControllers(!gwt);
log("Total blocks loaded: " + Block.getAllBlocks().size); log("Total blocks loaded: " + Block.getAllBlocks().size);
for(Block block : Block.getAllBlocks()){ for(Block block : Block.getAllBlocks()){

View File

@@ -27,7 +27,7 @@ public class DesktopInput extends InputHandler{
int endx, endy; int endx, endy;
private boolean enableHold = false; private boolean enableHold = false;
private boolean beganBreak; private boolean beganBreak;
private boolean rotated = false; private boolean rotated = false, rotatedAlt;
@Override public float getCursorEndX(){ return endx; } @Override public float getCursorEndX(){ return endx; }
@Override public float getCursorEndY(){ return endy; } @Override public float getCursorEndY(){ return endy; }
@@ -71,7 +71,12 @@ public class DesktopInput extends InputHandler{
} }
if(!Inputs.getAxisActive("rotate_alt")) rotated = false; if(!Inputs.getAxisActive("rotate_alt")) rotated = false;
player.rotation += Inputs.getAxis("rotate"); if(!rotatedAlt) {
player.rotation += Inputs.getAxis("rotate");
rotatedAlt = true;
}
if(!Inputs.getAxisActive("rotate")) rotatedAlt = false;
player.rotation = Mathf.mod(player.rotation, 4); player.rotation = Mathf.mod(player.rotation, 4);
if(Inputs.keyDown("break")){ if(Inputs.keyDown("break")){

View File

@@ -15,6 +15,8 @@ public class Map{
public transient Pixmap pixmap; public transient Pixmap pixmap;
public transient Texture texture; public transient Texture texture;
public Map(){}
public int getWidth(){ public int getWidth(){
return pixmap.getWidth(); return pixmap.getWidth();
} }

View File

@@ -152,13 +152,13 @@ public class Maps implements Disposable{
maps.clear(); maps.clear();
} }
private static class ArrayContainer{ public static class ArrayContainer{
Array<Map> maps; Array<Map> maps;
ArrayContainer() { public ArrayContainer() {
} }
ArrayContainer(Array<Map> maps) { public ArrayContainer(Array<Map> maps) {
this.maps = maps; this.maps = maps;
} }
} }

View File

@@ -69,7 +69,7 @@ task packrCmd(type: Exec) {
copy{ copy{
into PACKR_DIR into PACKR_DIR
from "build/libs/desktop-1.0.jar" from "build/libs/desktop-release.jar"
} }
commandLine "java", "-jar", PACKR_DIR+"packr.jar", "--verbose", /*"--resources", project.ext.assetsDir,*/ "--platform", getPlatform(), "--executable", appName, "--output", "packr-out/", "--mainclass", project.ext.mainClassName, "--jdk", PACKR_DIR+"jdk-"+getPlatform()+".zip", "--classpath", commandLine "java", "-jar", PACKR_DIR+"packr.jar", "--verbose", /*"--resources", project.ext.assetsDir,*/ "--platform", getPlatform(), "--executable", appName, "--output", "packr-out/", "--mainclass", project.ext.mainClassName, "--jdk", PACKR_DIR+"jdk-"+getPlatform()+".zip", "--classpath",

View File

@@ -10,11 +10,10 @@ gwt {
modules 'io.anuke.mindustry.GdxDefinition' modules 'io.anuke.mindustry.GdxDefinition'
devModules 'io.anuke.mindustry.GdxDefinitionSuperdev' devModules 'io.anuke.mindustry.GdxDefinitionSuperdev'
project.webAppDirName = 'webapp' project.webAppDirName = 'webapp'
compiler.style = de.richsource.gradle.plugins.gwt.Style.PRETTY;
compiler { compiler {
strict = true; strict = true
disableCastChecking = true; disableCastChecking = true
} }
} }