Merge upstream changes to web port
This commit is contained in:
@@ -21,10 +21,10 @@ package com.shatteredpixel.shatteredpixeldungeon.html;
|
||||
import com.github.xpenatan.gdx.backends.teavm.config.AssetFileHandle;
|
||||
import com.github.xpenatan.gdx.backends.teavm.config.TeaBuildConfiguration;
|
||||
import com.github.xpenatan.gdx.backends.teavm.config.TeaBuilder;
|
||||
import com.github.xpenatan.gdx.backends.teavm.config.TeaTargetType;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.teavm.tooling.TeaVMTool;
|
||||
import org.teavm.tooling.TeaVMTargetType;
|
||||
import org.teavm.vm.TeaVMOptimizationLevel;
|
||||
|
||||
public class Configure {
|
||||
@@ -47,8 +47,8 @@ public class Configure {
|
||||
conf.assetsPath.add(new AssetFileHandle("../html/src/main/assets"));
|
||||
conf.shouldGenerateAssetFile = true;
|
||||
conf.webappPath = new File("../release").getAbsolutePath();
|
||||
conf.targetType = TeaTargetType.JAVASCRIPT;
|
||||
//conf.targetType = TeaTargetType.WEBASSEMBLY;
|
||||
conf.targetType = TeaVMTargetType.JAVASCRIPT;
|
||||
//conf.targetType = TeaVMTargetType.WEBASSEMBLY;
|
||||
TeaBuilder.config(conf);
|
||||
}
|
||||
|
||||
|
||||
@@ -82,7 +82,7 @@ public class HtmlPlatformSupport extends PlatformSupport {
|
||||
}
|
||||
|
||||
private static FreeTypeFontGenerator basicFontGenerator;
|
||||
|
||||
|
||||
@Override
|
||||
public void setupFontGenerators(int pageSize, boolean systemfont) {
|
||||
//don't bother doing anything if nothing has changed
|
||||
@@ -96,12 +96,12 @@ public class HtmlPlatformSupport extends PlatformSupport {
|
||||
fonts = new HashMap<>();
|
||||
|
||||
basicFontGenerator = new FreeTypeFontGenerator(Gdx.files.internal("fonts/pixel_font.ttf"));
|
||||
|
||||
|
||||
fonts.put(basicFontGenerator, new HashMap<>());
|
||||
|
||||
|
||||
packer = new PixmapPacker(pageSize, pageSize, Pixmap.Format.RGBA8888, 1, false);
|
||||
}
|
||||
|
||||
|
||||
@Override
|
||||
protected FreeTypeFontGenerator getGeneratorForString( String input ) {
|
||||
return basicFontGenerator;
|
||||
|
||||
@@ -40,7 +40,7 @@ public class TeaVMLauncher {
|
||||
}
|
||||
|
||||
private static void initializeServices() {
|
||||
Game.version = "3.2.5";
|
||||
Game.versionCode = 877;
|
||||
Game.version = "3.3.3";
|
||||
Game.versionCode = 887;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user