2.19 Miniwood compatibility

If you want your plugin to be compatible with Miniwood, you need to be prepared that some functions might not be available. For example, the function hw_AddBrush() will only be available if the script has loaded brush library. Note, however, that its function pointer in the GfxBase table will never be NULL so it's still possible to call hw_AddBrush() even if brush library hasn't been loaded, but the function will always fail if brush library isn't available. So you must make sure your plugin handles this case correctly.

To check if a certain library is available, you can use the hw_HaveLibrary() function. To check if Miniwood is active, you can query the HWMCP_ISMINIWOOD flag using hw_MasterControl().

To find out the dependencies of the individual plugin interface functions, check out their docoumentation in this manual. If a plugin interface function depends on a certain library, there will be an additional header named "library" in its documentation that mentions the library that is required by this function. Plugin interface functions that have no library section in their documentation will always be available, no matter what libraries are loaded. For example, lowlevel functions like hw_TrackedAlloc() or hw_TrackedFree() are always available and you don't have to check any library first.

Note that JPEGBase, FT2Base, and ZBase will be NULL when Miniwood is active unless the libraries that provide them have been loaded.


Show TOC