Expand description
A Rust crate to interface between GameMaker and Rust.
Macros
- This is exactly like
print
, but works within NPC Studio DLLs. It’s not ideal, but it does the job! - This is exactly like
println
, but works within NPC Studio DLLs. It’s not ideal, but it does the job!
Structs
- A GmBuffer whose purpose is to pass return data from Rust to GM. Useful in situations where you need to return an OutputCode, but still have return data that needs to be communicated.
- A utility for writing into a Bridge. Maintains a cursor, only relevant for its own writes.
- Our basic GmBuffer. This holds anything you want.
- This is a Gm Id for a buffer, or any other dynamically allocated resource. It is transparent in memory but opaque in type (ie, you can’t inspect what’s inside it), so it can be sent back and forth to GM as an f64.
- Representation of a pointer sent from GameMaker. Dereferences into its inner c_char.
- This is a Gm Real, which can be a resource, or any other stable resource.
- This struct abstracts for our purposes to only
adam
. It’s not very useful to people outside NPC Studio (unless they also useadam
), so it’s kept internally. - A status code the represents the outcome of a Rust-side function, intended to be sent back to GameMaker.
Functions
- This sets up a fairly decent panic hook. Pass in the name for us to format to use to identify the DLL.