Jump to content
  • Advertisement
Sign in to follow this  
optime

samples/tutorial scriptstring on mac

This topic is 4857 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I am reviewing angelscript as a script engine for a project I am working on. The lib compiles fine with #define AS_MAX_PORTABILITY. I have trouble running the samples/turial code though: It exits in scriptstring.cpp:318 because r < 0. The actual line is: r = scriptengine->RegisterObjectBehaviour("string", asBEHAVE_CONSTRUCT, "void f()", asFUNCTION(ConstructString), asCALL_CDECL_OBJLAST); assert( r >= 0 ); I debugged and got into: as_scriptengine:1002 int r = DetectCallingConvention(datatype != 0, funcPointer, callConv, &internal); which is being called with isMethod = true, callConv = 3 and therefore exits with asNOT_SUPPORTED Any suggestions?

Share this post


Link to post
Share on other sites
Advertisement
With AS_MAX_PORTABILITY turned on you will only be able to use the asCALL_GENERIC calling convention. Currently none of the samples have been prepared for this, but you may get an idea on how it works by looking at the test_generic.cpp in the tests/test_feature folder.

I intend to write a sample that will work with the AS_MAX_PORTABILITY mode as well, but haven't found the time to do so yet.

Regards,
Andreas

Share this post


Link to post
Share on other sites
Could you add as_callfunc_ppc.cpp? That would instantly give you mac and xbox 360 support ;).

EDIT:
IMHO it's just the asm that differs from as_callfunc_x86.

Share this post


Link to post
Share on other sites
I would love to add an as_callfunc_ppc.cpp module, however I don't have a Mac to develop this code on. But if you or someone else would be interested in doing the port I will be more than happy to help with getting everything working.

I don't know if there will be any problem with endian differences. It would have to be tested.

Regards,
Andreas

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

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

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!