[angelscript] AngelScript 1.6.1 beta 3

  • From: "Andreas Jonsson" <angelcode@xxxxxxx>
  • To: angelscript@xxxxxxxxxxxxx
  • Date: Tue, 02 Mar 2004 20:11:57 +0000

A third beta release has been released. This one, for a change, doesn't hav=
e any bug fixes. Instead I've been working on preparing the engine for su=
pporting operator overloading. For this reason the way you register funct=
ions have changed slightly.=20

1. asFUNCTION and asMETHOD types are no longer types, but instead macros. I=
nstead of writing (asFUNCTION)funcPointer, you should write asFUNCTION(fu=
ncPointer), and the same for asMETHOD.

2. RegisterObjectMethod() now has a new calling convention that can be used=
 instead of asCALL_THISCALL. asCALL_CDECL_OBJLAST allows you to register =
a normal C function as an object method. The engine will then send the ob=
ject method as a hidden last parameter.

3. RegisterTypeBehaviour() should now use either asCALL_CDECL_OBJLAST or as=
CALL_THISCALL. For the constructor and destructor you only need to change=
 the calling convention to asCALL_CDECL_OBJLAST and it will work. For the=
 assignment behaviour you will have to change to asCALL_CDECL_OBJLAST and=
 switch the order of the function parameters as the destination is now th=
e last parameter. Don't forget that your assignment behaviour should also=
 return the pointer to the destination.

The type behaviour functions can now use object methods as well as global C=
 functions, however you will not be able to register the object construct=
or or destructor directly as C++ doesn't allow you to take the address of=
 these special functions. For these two behaviours you are forced to writ=
e two other functions that will do the same thing (or in the case of the =
destructor call the actual destructor of the object). For the assignment =
behaviour function you can register an overloaded assignment operator if =
you have one.

Another new feature for this beta is that you can now use script pointers i=
n comparisons. This will allow you to compare two pointers or compare wit=
h 0 for null pointer tests. I had overlocked this rather important featur=
e so thank Thomas Suter, author of the Zola Engine, for pointing that out=
 for me.=20

The next beta will feature at least rudimentary operator overloading. Once =
the operator overloading is working I will close the beta and release the=
 final 1.6.1 version.

Regards,
Andreas J=F6nsson
Author of AngelScript
www.AngelCode.com


AngelScript - AngelCode Scripting Library
http://www.angelcode.com/angelscript/

Other related posts:

  • » [angelscript] AngelScript 1.6.1 beta 3