mirror of
https://github.com/RandomityGuy/MBHaxe.git
synced 2026-01-01 21:02:22 +00:00
make it sorta work
This commit is contained in:
parent
5cce2befa0
commit
b11cf3ac58
5 changed files with 12 additions and 8 deletions
|
|
@ -85,7 +85,7 @@ class Main extends hxd.App {
|
|||
ResourceLoader.init(s2d, () -> {
|
||||
AudioManager.init();
|
||||
AudioManager.playShell();
|
||||
Marbleland.init();
|
||||
// Marbleland.init();
|
||||
marbleGame = new MarbleGame(s2d, s3d);
|
||||
MarbleGame.canvas.setContent(new PresentsGui());
|
||||
MissionList.buildMissionList(); // Yeah pls
|
||||
|
|
|
|||
|
|
@ -58,7 +58,8 @@ class Mission {
|
|||
|
||||
public function load() {
|
||||
var entry = ResourceLoader.getFileEntry(this.path).entry;
|
||||
var misText = Util.toASCII(entry.getBytes());
|
||||
var misText = entry.getText();
|
||||
trace('Loading ${this.path}');
|
||||
|
||||
var misParser = new MisParser(misText);
|
||||
var contents = misParser.parse();
|
||||
|
|
|
|||
|
|
@ -86,7 +86,11 @@ class Renderer extends h3d.scene.Renderer {
|
|||
|
||||
override function render() {
|
||||
if (backBuffer == null) {
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24Stencil8);
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24);
|
||||
if (depthBuffer.format != Depth24) {
|
||||
depthBuffer.dispose();
|
||||
depthBuffer = new DepthBuffer(cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, Depth24);
|
||||
}
|
||||
backBuffer = ctx.textures.allocTarget("backBuffer", cast ctx.engine.width / pixelRatio, cast ctx.engine.height / pixelRatio, false);
|
||||
backBuffer.depthBuffer = depthBuffer;
|
||||
}
|
||||
|
|
@ -122,9 +126,9 @@ class Renderer extends h3d.scene.Renderer {
|
|||
renderPass(defaultPass, get("skyshape"), backToFront);
|
||||
}
|
||||
if (!cubemapPass || Settings.optionsSettings.reflectionDetail >= 2) {
|
||||
if (!cubemapPass)
|
||||
ProfilerUI.measure("interiorZPass");
|
||||
renderPass(defaultPass, get("zPass"));
|
||||
// if (!cubemapPass)
|
||||
// ProfilerUI.measure("interiorZPass");
|
||||
// renderPass(defaultPass, get("zPass"));
|
||||
if (!cubemapPass)
|
||||
ProfilerUI.measure("interior");
|
||||
renderPass(defaultPass, get("interior"));
|
||||
|
|
|
|||
|
|
@ -24,7 +24,7 @@ class CubemapRenderer {
|
|||
this.scene = scene;
|
||||
this.sky = sky;
|
||||
this.cubemap = new Texture(128, 128, [Cube, Dynamic, Target], h3d.mat.Data.TextureFormat.RGB8);
|
||||
this.cubemap.depthBuffer = new h3d.mat.DepthBuffer(128, 128, h3d.mat.DepthBuffer.DepthFormat.Depth16);
|
||||
this.cubemap.depthBuffer = new h3d.mat.DepthBuffer(128, 128, h3d.mat.DepthBuffer.DepthFormat.Depth24);
|
||||
this.camera = new Camera(90, 1, 1, 0.1, 1000);
|
||||
this.position = new Vector();
|
||||
this.nextFaceToRender = 0;
|
||||
|
|
|
|||
|
|
@ -13,7 +13,6 @@ class PauseButton extends TouchButton {
|
|||
|
||||
this.onClick = () -> {
|
||||
if (MarbleGame.instance.world != null) {
|
||||
@:privateAccess MarbleGame.instance.paused = true;
|
||||
MarbleGame.instance.handlePauseGame();
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue