• Hey Guest! Ever feel like entering a Game Jam, but the time limit is always too much pressure? We get it... You lead a hectic life and dedicating 3 whole days to make a game just doesn't work for you! So, why not enter the GMC SLOW JAM? Take your time! Kick back and make your game over 4 months! Interested? Then just click here!

GameMaker Suggestion: Calling convention option for external functions

S

syscall

Guest
Hello,

I am very new to the world of GameMaker, I have just started using it since last week... But, I am fairly experienced in several of other programming languages (such as C++, C#, JavaScript).

That being said, I am the one who prefers object-oriented programming. So, I started to learn about GML (in GMS2), I know you can have object inheritance (and use
Code:
event_inherited();
), and to simulate property chain using array and enumeration construct in GML... (I learn fast :D)

So, yesterday, I have read all over the documentation about "Creating an extension".
And today, I have decided to create a first extension (in C#) for my very first game in GMS2, which would support Windows platform only (for now, I am focused all about Windows platform only).
I have compiled out a mixed-mode assembly while exporting a couple of managed functions for testing them out in GML.
That was done quickly, then I added the file and defined those functions as a part of the extension, set it all correctly, created a new GML script, called a couple of external functions and showing their return value using
Code:
show_message
function. It is working flawlessly.

However, I have noticed, the (external) functions I have exported from DLL are using "cdecl" calling convention (by default).
I would like to know, do you have any plans to implement an option "Calling convention" for external functions?

Best regards!
 
S

syscall

Guest
Oh, nice there is a function for this in GML!
But, as you can see on the screenshot I post, there is no option to select calling convention from extensions window.
 
Top