Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions Celeste.Mod.mm/Patches/Skybox.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
#pragma warning disable CS0626 // Method, operator, or accessor is marked external and has no attributes on it
#pragma warning disable CS0108 // Member hides inherited member; missing new keyword

using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Graphics;
using Monocle;
using MonoMod;

namespace Celeste {
class patch_Skybox : Skybox {

public patch_Skybox(VirtualTexture texture, float size = 25)
Comment thread
Saplonily marked this conversation as resolved.
: base(texture, size) {
}

public extern void orig_Draw(Matrix matrix, Color color);

public void Draw(Matrix matrix, Color color) {
// the orig method doesn't reset DepthStencilState to None.
// Some mods may begin a new SpriteBatch with DepthStencilState set to Default,
// which causes the Skybox to be rendered in front of the mountain.
Engine.Graphics.GraphicsDevice.DepthStencilState = DepthStencilState.None;
Comment thread
Saplonily marked this conversation as resolved.
orig_Draw(matrix, color);
}
}
}