mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2025-10-30 08:11:25 +00:00
android fixes
This commit is contained in:
parent
27975d99bc
commit
a39d3137fc
5 changed files with 10 additions and 4 deletions
|
|
@ -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());
|
||||
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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());
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue