Sign in to follow this  
WitchLord

AngelScript 2.26.0 is out

Recommended Posts

TechRogue    722

register class methods as global functions without the need for wrappers.

 

I like the sound of that! Does this just mean we can use asMETHOD() instead of asFUNCTION() when registering global functions? That's going to make my life a lot easier.

 

Initialization at declaration is another thing I've been looking forward to. Thanks as always for all your work. :)

Share this post


Link to post
Share on other sites
WitchLord    4677

@Jake,

 

Yes, to register a class method (not static) as global function, you will use asMETHOD. In order for it to work the object pointer must also be informed at registration.

 

Example:

 

 

Object obj;
engine->RegisterGlobalFunction("void func()", asMETHOD(Object, Func), asCALL_THISCALL_ASGLOBAL, &obj);

 

See also the manual.

 

@André,

 

It is. It would appear that smaller independent developers that manages to get success are much more likely to support open source projects, than the larger developers that have more regular successes. My guess is that it is because these smaller developers are much more likely to know how it is to be short of funds, and thus more likely to sympathize with other small independent developers. smile.png

Edited by Andreas Jonsson

Share this post


Link to post
Share on other sites
ruphert    209

It seems the new version doesn't compile on Mac OSX (tested with 2 different systems):

 

c++ -g -Wall -fPIC -arch i386 -arch x86_64 -o obj/as_atomic.o -c ../../source/as_atomic.cpp
../../source/as_atomic.cpp:149: error: prototype for 'int asCAtomic::atomicDec(int&)' does not match any in class 'asCAtomic'
../../source/as_atomic.cpp:61: error: candidate is: asDWORD asCAtomic::atomicDec()
../../source/as_atomic.cpp:149: error: prototype for 'int asCAtomic::atomicDec(int&)' does not match any in class 'asCAtomic'
../../source/as_atomic.cpp:61: error: candidate is: asDWORD asCAtomic::atomicDec()
lipo: can't figure out the architecture type of: /var/tmp//ccdlDTNp.out

 

-EDIT-

 

Fixed!

Seemed like a typo at line 149 in as_atomic.cpp, should be:

 

int asAtomicDec(int &value)

Edited by thd.MM

Share this post


Link to post
Share on other sites
BClarenbach    130

* CScriptBuilder::AddSectionFromMemory() now requires a name and an optional length for the buffer in case it is not null terminated (Thanks Paril101)

 

was a dangerous change because it swaps the order of parameters but because of the new default parameter, its not obvious when you update. :)

Share this post


Link to post
Share on other sites
FDsagizi    514

The major new enhancement in this version is the support for initializing script class members directly in the declaration.

 

Using it for 2 days and it is very cool! I'm happy! 

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

Sign in to follow this