TorqueBind?
by Lennart Steinke · in Torque Game Builder · 03/16/2005 (2:14 am) · 1 replies
Hi!
I wanted to ask if there's a tool that works in a similar way as LuaBind does? Like I give it a header and it creates the needed files to interface with the C/C++ functions defined in that header. The reason I ask is that something like this would allow me to use, say, FMod instead of OpenAL for sounds / music.
And not having to write the adapter functions myself would be really neat :)
Thanks,
Lenny
I wanted to ask if there's a tool that works in a similar way as LuaBind does? Like I give it a header and it creates the needed files to interface with the C/C++ functions defined in that header. The reason I ask is that something like this would allow me to use, say, FMod instead of OpenAL for sounds / music.
And not having to write the adapter functions myself would be really neat :)
Thanks,
Lenny
About the author
Torque Owner Fenrir Wolf
Generally, converting from TorqueScript to the actual C++ functions requires string operations, as TS's variables are all treated as strings. However, you could always write a parser that examines a method's expected parameters and then do the proper conversions.
However, ConsoleFunctions are pretty simple to add on their own, so it might be a little typing work up front to integrate something like that. Usually, though, I don't want console funcs for all of my methods -- So I suppose something like LuaBind takes into account the scoping.