diff --git a/src/Main.hx b/src/Main.hx index 2d548997..36cb25b7 100644 --- a/src/Main.hx +++ b/src/Main.hx @@ -57,11 +57,16 @@ class Main extends hxd.App { }); #end + trace("ResourceLoader::init"); ResourceLoader.init(s2d, () -> { + trace("Settings::init"); Settings.init(); + trace("Gamepad::init"); Gamepad.init(); + trace("AudioManager::init"); AudioManager.init(); AudioManager.playShell(); + trace("MarbleGame::new"); marbleGame = new MarbleGame(s2d, s3d); MarbleGame.canvas.setContent(new MainMenuGui()); diff --git a/src/ResourceLoader.hx b/src/ResourceLoader.hx index a25417a4..a819601e 100644 --- a/src/ResourceLoader.hx +++ b/src/ResourceLoader.hx @@ -44,7 +44,7 @@ class ResourceLoader { // static var threadPool:FixedThreadPool = new FixedThreadPool(4); public static function init(scene2d:h2d.Scene, onLoadedFunc:Void->Void) { - #if hl + #if (hl && !android) @:privateAccess @:privateAccess cast(fileSystem, LocalFileSystem).convert.tmpDir = "data/tmp/"; #end hxd.res.Resource.LIVE_UPDATE = false; // Disable live update to save frames diff --git a/src/Settings.hx b/src/Settings.hx index 71025f16..22aef056 100644 --- a/src/Settings.hx +++ b/src/Settings.hx @@ -180,7 +180,7 @@ class Settings { #end public static function applySettings() { - #if hl + #if (hl && !android) Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight); Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed; #end @@ -336,7 +336,7 @@ class Settings { public static function init() { load(); #if hl - Window.getInstance().resize(optionsSettings.screenWidth, optionsSettings.screenHeight); + Window.getInstance().resize(Window.getInstance().width, Window.getInstance().height); Window.getInstance().displayMode = optionsSettings.isFullScreen ? FullscreenResize : Windowed; uiScale = 1 / Window.getInstance().windowToPixelRatio; #end diff --git a/src/fs/ManifestFileSystem.hx b/src/fs/ManifestFileSystem.hx index 88ec073b..991b59b3 100644 --- a/src/fs/ManifestFileSystem.hx +++ b/src/fs/ManifestFileSystem.hx @@ -80,6 +80,7 @@ class ManifestEntry extends FileEntry { #if (sys && !android) return sys.io.File.getBytes(file); #elseif android + trace('Trying to get bytes for ${name}'); bytes = AssetsTools.getBytes(file); return bytes; #else diff --git a/src/gui/HelpCreditsGui.hx b/src/gui/HelpCreditsGui.hx index 773fe22e..2211556d 100644 --- a/src/gui/HelpCreditsGui.hx +++ b/src/gui/HelpCreditsGui.hx @@ -450,7 +450,7 @@ class HelpCreditsGui extends GuiImage { dtsObj.init(null, () -> {}); // The lambda is not gonna run async anyway for (mat in dtsObj.materials) { mat.mainPass.enableLights = false; - mat.mainPass.culling = Front; + mat.mainPass.culling = Back; if (mat.blendMode != Alpha && mat.blendMode != Add) mat.mainPass.addShader(new AlphaChannel()); }