Skip to content

Instantly share code, notes, and snippets.

@jackmott
jackmott / ShaderManager.cs
Created March 13, 2017 19:21
Hot Swappable Shaders for MonoGame
/*
HotSwap shader sytem for MonoGame
HotSwap code only exists for debug builds
Edit paths to match your project
Construct in your Initialize method
Add shaders in LoadContent (or whenever)
Call CheckForChanges in Update() or periodically however you like
mgcb.exe usually located in C:\Program Files (x86)\MSBuild\MonoGame\v3.0\Tools
*/
@NoelFB
NoelFB / Aseprite.cs
Last active May 10, 2024 01:44
ugly C# .ase (aseprite) parser
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Text;
// File Format:
// https://github.com/aseprite/aseprite/blob/master/docs/ase-file-specs.md
// Note: I didn't test with with Indexed or Grayscale colors
@queercodedcoder
queercodedcoder / Aseprite.cs
Last active February 23, 2024 09:06 — forked from NoelFB/Aseprite.cs
ugly C# .ase (aseprite) parser
using System;
using System.Collections.Generic;
using System.IO;
using System.IO.Compression;
using System.Text;
// This .ase parser is taken from Noel Berry, one of the developers of Celeste.
// https://gist.github.com/NoelFB/778d190e5d17f1b86ebf39325346fcc5
// A little bit of research reveals that he used it as part of their asset
// pipeline: parsing .ase files into sliced regions & pivots, building
/*
The purpose of this plugin is to disable certain procedures that are intended to be
developer-only secret code that you don't want to end up in the final release build
of your program.
To use this plugin, compile your program with `jai main.jai -plug Developer_Only`
and then mark certain procedures with the `@Developer` note. These procedures will
have their body deleted when in developer builds.