🎉 Celebrating 25 Years of GameDev.net! 🎉

Not many can claim 25 years on the Internet! Join us in celebrating this milestone. Learn more about our history, and thank you for being a part of our community!

New Script Binder

Started by
1 comment, last by lxnyce 19 years, 9 months ago
Here is a WIP version of a script binder I put together in a rush. http://www.xl3d.com/angelscript/asSourceParser.zip It supports nested class inheritance, and automatic updates of your interfaces. Run the included project and check the generated markup.cpp for the generated include file. Its not really fully developed right now, but I find its a heck of a lot easier to get your stuff imported with it. With just a few paste operations, you can export whole classes as well as their base classes without any extra work. Give it a go, and let me know what you think. Read the readme.txt for a brief description. I think its pretty flexible, so please try it with your classes and let me know how it goes. Leave out constructors, destructors and operators for now. I haven't implemented those yet (any help on how to register them automatically would be appreciated). One question on the biggest problem I ran into however... How does one get around having multiple functions of the same name in a class being declared? Right now I am just commenting out multiple names when they occur. For ex: class test { void GetPoint( int &x, int &y ); void GetPoint( float&x, float &y ); } The way I am using righ tnow won't allow me to declare those procedures because it doesn't know which one to use.
Advertisement
For the overloaded functions you can use the macro asMETHODPR(class, method, parameters, returntype), e.g:

asMETHODPR(test,GetPoint,(int&x, int&y),void)


The constructors/destructors can be implemented with simple wrapper functions.

I know it is an early version, but I would like to upload it to my site, with a link to your page where readers can find the latest version. Is that ok with you?

AngelCode.com - game development and more - Reference DB - game developer references
AngelScript - free scripting library - BMFont - free bitmap font generator - Tower - free puzzle game

Thats fine with me, do with it as you please for all I care. I'll post here when the newer version is updated. It has support for typedefs and enumerations. I can almost automate the OpenGL header now.

This topic is closed to new replies.

Advertisement