Crate lunar_magic_wrapper

Crate lunar_magic_wrapper 

Source
Expand description

This crate provides a lightweight wrapper around Lunar Magic’s command line functions. It supports all available command line functions as of Lunar Magic 3.40.

Note that this crate requires wine to be installed, accessible as a command and working on operating systems other than Windows.

Paths passed to functions can be any type that can be turned into AsRef<Path>, e.g., the following will all work equally well:

 // `&str` works fine
 let output = lm_wrapper.export_gfx("C:/hacks/my_project/my_hack.smc");

 // So does a `Path`
 let output = lm_wrapper.export_gfx(Path::new("C:/hacks/my_project/my_hack.smc"));

 // So does a `String`
 let output = lm_wrapper.export_gfx(String::from("C:/hacks/my_project/my_hack.smc"));

 // And so on, but note that separators should be your operating system's separators, i.e. `\` should be used on Windows.

Structs§

LevelExportFlag
Contains currently available flags when importing multiple levels into the ROM using Wrapper::export_mult_levels.
LevelImportFlag
Contains currently available flags when importing multiple levels into the ROM using Wrapper::import_mult_levels.
Wrapper
A wrapper around Lunar Magic’s command line functionality.

Enums§

CompressionFormat
Contains all valid ROM compression formats that can be used with Wrapper::change_compression.
RomSize
Contains all valid ROM sizes that can be used with Wrapper::expand_rom.
WrapperErr
Contains errors raised as a result of an operation using a Wrapper.

Type Aliases§

ResultL
Result of invoking an operation through a Wrapper.