crunch

Provides a reading library for crunch texture packing files.

Members

Functions

crunchFromCompact
Crunch crunchFromCompact(const ubyte[] data, bool allowBinary)

Parses a crunch file from --compact or --binary output. For old --binary format files no trim and no rotate is assumed.

crunchFromCompact
Crunch crunchFromCompact(ubyte[] data, bool allowBinary)

Parses a crunch file from --compact output. Uses the GC .idup to make strings

crunchFromJson
Crunch crunchFromJson(JSONValue json)

Reads a crunch file from json (either old or new format)

crunchFromXml
Crunch crunchFromXml(string xmlStr)

Parses an xml file for crunch. Uses std.xml so it might get deprecated eventually.

searchInCompact
Crunch.Image searchInCompact(ubyte[] data, string name, out int textureIndex)

Finds one image in a compact file efficiently. Returns Crunch.Image.init when it couldn't be found.

Structs

Crunch
struct Crunch

Meta

License

public domain