Drell
Member
I am currently implementing a 3rd party DLL in my sudio's game, Evolver, and I'm having some issues understanding how the DLL would work in game maker. The DLL is a netcode that uses an object to manage the game session between end users, and I know that part of the issue is my lack of C based knowledge. This is the bit of example code that establishes the session to be managed:
GGPOSession is a struct containing GGPOSession. Then, GGPOErrorCode is the object name in the DLL itself, and ggpo_start_session is used to initialize the object. What I don't understand is how the variables are passed in and out of the DLL objects. I copied the example into GML as best I could:
but the immediately visible issue is the DLL reference variables will simple be treated as GML variables and either throw an error or have no effect at all. So, how do I get the Game Maker to pass, for example, the GML variable "result" to the DLL's variable GGPOErrorCode where GGPOErrorCode is an object? I am/was thinking this could be done using the extension constants, but the manual isn't exactly clear on how GM:S handles the value implemented. All help is much appreciated as this is crucial to my final project!
GGPOSession is a struct containing GGPOSession. Then, GGPOErrorCode is the object name in the DLL itself, and ggpo_start_session is used to initialize the object. What I don't understand is how the variables are passed in and out of the DLL objects. I copied the example into GML as best I could:
but the immediately visible issue is the DLL reference variables will simple be treated as GML variables and either throw an error or have no effect at all. So, how do I get the Game Maker to pass, for example, the GML variable "result" to the DLL's variable GGPOErrorCode where GGPOErrorCode is an object? I am/was thinking this could be done using the extension constants, but the manual isn't exactly clear on how GM:S handles the value implemented. All help is much appreciated as this is crucial to my final project!