Advertisement

Passing application side array to AS?

Started by June 17, 2009 01:45 AM
5 comments, last by Wavesonics 15 years, 5 months ago
See how AS arrays are more then C++ arrays, there probably isn't a great way of doing this huh?
==============================
A Developers Blog | Dark Rock Studios - My Site
I use the std::vector registration helper included in the sdk with a modified version for use with handles of classes. I like it much.
Advertisement
I guess I missed it, where is that functionality provided in the SDK?
==============================
A Developers Blog | Dark Rock Studios - My Site
An example of std::vector binding is in tests/test_feature/source/stdvector.h.
Ah great, thanks guys :)
==============================
A Developers Blog | Dark Rock Studios - My Site
As of 2.17.0 (if all goes as planned) you'll be able to register a template type, e.g. array<class T> and AngelScript will be able to instanciate it for any type. For the array types that the application uses, you'll be able to register a template specialization, e.g. arrat<float> so you can directly pass arrays of this type to and from scripts.

This is a generalization of the current built-in array type and the array type overloading that stdvector.h does. Eventually I'll probably remove the built-in dynamic array type in favour of this template type (with a standard add-on, of course).

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

Advertisement
Wow that'll be fantastic!
==============================
A Developers Blog | Dark Rock Studios - My Site

This topic is closed to new replies.

Advertisement