Robert fixed our Windows functions for calling DLL's so that they can use strings correctly. I decided to add to this vast improvement by making these functions work on Mac OS X, Linux, and FreeBSD. Mac is still broken so it's not tested on there, but there's no reason why it wouldn't work, once the Cocoa and Mac SDL platforms get patched.
Functions introduced by this extension:
- external_define(dll, name, calltype, restype, argnumb, argtype, argtype, ...argtype)
- external_call(id, args[0...15])
Example project demonstrating the use of external functions:https://enigma-dev.org/edc/games.php?game=111
Example DLL source code:https://github.com/time-killer-games/DialogModule
This means nearly all GameMaker extensions for Desktop Platforms should now work in ENIGMA out-of-the-box, whether for GameMaker Studio or older versions of GameMaker. Although you will need to set a compatibility mode for the version of GM your extension is built for in order to get window_handle() working. The only thing to be done is to convert your extension to use scripts with the external functions because we don't support GameMaker's special extension package formats yet. Due to POSIX and/or X11 compliance, a lot of Linux and Mac OS X extensions can be rebuilt and "just work" on FreeBSD in a lot of cases if you have the source code handy.
To get access to these new features, simply update enigma to the latest version and enable the "External Functions" extension like so:
You will also need to install libffi. Windows users should already have this installed because we've included it on our Windows Installation page for a long time now. As for everyone else, the dependency can be installed for your platform using the terminal commands below...
sudo apt-get install libffi-dev
sudo pacman -Sy libffi
sudo pkg ins libffi
Have a wonderful day.