MudbuG
Member
I am currently working on an extension that targets both Windows and HTML5 targets. In the first case, I have a c++ DLL, in the 2nd case, a javascript file. I want to call the same function in both cases. GM prevents me from using the same function name in the js extension as I did in the c++ extension.
What is the correct approach (or maybe one of the correct approaches) for accomplishing this task? With the limited information I have at hand right now, my first thought is this sort of work-around:
What is the correct approach (or maybe one of the correct approaches) for accomplishing this task? With the limited information I have at hand right now, my first thought is this sort of work-around:
- name the same function differently in each extension file
- win_do_something
- js_do_something
- create an GML script, "do_something" to act as an adaptor
- detect platform in this script and decide to call either "win_do_something" or "js_do_something"