Jump to content
  • Advertisement


  • Content count

  • Joined

  • Last visited

Community Reputation

4693 Excellent


About WitchLord

  • Rank
    Moderator - AngelCode

Personal Information

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

  1. WitchLord

    AngelScript - No Copy Construction for Script Classes

    I've implemented this now so the compiler will properly recognize and use the script class' copy constructor. CreateScriptObjectCopy will also do the same. You can find the changes in revision 2521. Regards, Andreas
  2. Good point. I'll have it updated in the repository too.
  3. WitchLord

    AngelScript - No Copy Construction for Script Classes

    Now it is a known issue. I'll have this fixed. Do you have specific need for this to work? Or are you just worried about the optimization?
  4. If you have a library and are willing to share it with the community I would suggest to create an open source project for it, e.g. like the AngelScript Add-on Template Library maintained by Sami Vuorela. I would be happy to link to your library from my site so others can easily find it. What I specifically think the autowrapper add-on could use is a refactor to use the new C++ template variadic feature, to avoid all the repeated code. The generic calling convetion is a fallback needed on the platforms for which AngelScript currently doesn't support native calling conventions, currently the most important platforms like this are the 64bit iOS and Android platforms, but also any less popular platforms that I may never have heard about would obviously not be supported with native calling conventions. If you're not going to target any platform that doesn't have support for native calling conventions, then you do not need to implement the generic calling convention. With the help of the autowrappers it is anyway quite simple to add this support afterwards when needed, so you don't need to spend effort on this at the beginning. I believe it would be possible. I don't remember ever doing something like this myself, but I can imagine you could write the macro to instantiate a class that would as part of the constructor add the command to some global singleton instance. The global singleton instance can later be accessed to get the full list of commands.
  5. WitchLord

    BMFont yoffset issue in my code

    I think it would help if you look at some existing code, and compare your solution. You can have a look at my implementation here: http://svn.code.sf.net/p/actb/code/trunk/source/gfx/acgfx_font.cpp . The rendering of the characters happens in void CFont::InternalWrite(float x, float y, float z, const char *text, int count, float spacing) Make sure you consider the orientation of your coordinate system. In my implementation the coordinate system is left-hand oriented, i.e. (0,0) in the lower left corner of the screen, and Y grows upwards.
  6. I didn't write the autowrapper.h myself. That was a contribution from SiCrane. I'm honestly not very good at meta programming myself and tend to use it only when absolutely necessary. The autowrapper.h itself is actually generated using a small program http://svn.code.sf.net/p/angelscript/code/trunk/sdk/add_on/autowrapper/generator/. It was created before C++ had support for variadic template arguments, so that's why you see a lot of similar code to handle different amount of arguments. The code itself automatically builds the generic calling convention wrapper from ordinary functions/class methods. The macros defined in autowrapper.h can be used as replacement for the asFUNCTION, asMETHOD, asFUNCTIONPR, and asMETHODPR macros. The documention on how to use this is available here: http://www.angelcode.com/angelscript/sdk/docs/manual/doc_addon_autowrap.html As for any good geom library. I can't say I've seen any. But why not take a look at some of the open source engines that use AngelScript. Urho3D comes to my mind as a probable good source, but there are probably others too. You can also take a look at my own prototype engine http://www.angelcode.com/projectx/ but it is far from an exemplary source. I have no plans to include a standard geom library as an add-on in the SDK, but if someone were to create an open source library for it I would be happy to link to it.
  7. I don't see any direct risks with this. It ought to work just fine. The autowrapper add-on has some similarities, though it doesn't use the template variadic arguments (perhaps you'd like to help out making improvements to this code? *hint* ).
  8. I've fixed this in revision 2514. Regards, Andreas
  9. WitchLord

    Set up class members from c++

    I'm not familiar with how Unity works so I'm not entirely sure what you're trying to accomplish, but in AngelScript you can create instances of script classes from C++ side and initialize the members manually if you wish. You can use the engine->CreateUninitializedScriptObject then enumerate the members and set their values. The serializer add-on can potentially be used to help understand how to do this.
  10. WitchLord

    Initialization list may not function properly.

    This wasn't caused by the previous change. Anyway, I've fixed this too in revision 2513.
  11. WitchLord

    Initialization list may not function properly.

    I've made changes in revision 2512 so that the compiler will now implicitly make the ref types handles in initialization lists when asEP_DISALLOW_VALUE_ASSIGN_FOR_REF_TYPE is set. This solves the problem you identified. Regards, Andreas
  12. WitchLord

    Refcounting in opCast

    Fixed in revision 2510
  13. WitchLord

    Refcounting in opCast

    Thanks for the alert. I'll add this as another test case and have it fixed too.
  14. WitchLord

    Refcounting in opCast

    I've fixed this in revision 2509. Regards, Andreas
  • Advertisement

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!