make it sorta work

This commit is contained in:
RandomityGuy 2023-07-07 21:57:11 +05:30
parent 5cce2befa0
commit b11cf3ac58
5 changed files with 12 additions and 8 deletions

View file

@ -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

View file

@ -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();

View file

@ -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"));

View file

@ -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;

View file

@ -13,7 +13,6 @@ class PauseButton extends TouchButton {
this.onClick = () -> {
if (MarbleGame.instance.world != null) {
@:privateAccess MarbleGame.instance.paused = true;
MarbleGame.instance.handlePauseGame();
}
}