Followers 0

# AngelScript 2.26.0 is out

## 10 posts in this topic

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. :)

0

##### Share on other sites

It is nice to see companies like Frictional games contributing to the development of AngelScript.

0

##### Share on other sites

@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);


@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.

Edited by Andreas Jonsson
1

##### Share on other sites

Thank you Frictional Games and Thank you Andreas Jonsson.

0

##### Share on other sites

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
1

##### Share on other sites

Thanks. I'll have this fixed.

 Checked in to revision 1546.

Edited by Andreas Jonsson
0

##### Share on other sites

* 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. :)

1

##### Share on other sites

Yes, I had another user reporting problem because of that too. Sorry about that.

0

##### Share on other sites

Thank you Frictional Games and Thank you Andreas Jonsson.

0

##### Share on other sites

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!

0

## Create an account

Register a new account