Jump to content

  • Log In with Google      Sign In   
  • Create Account


#Actualizackp

Posted 01 March 2013 - 06:18 AM

Sort of... I ended up hacking it in by adding an extra parameter to the registerObjectBehavior function so now I can do this:
 

void SpriteScripted::registerAS(asIScriptEngine* engine, ScriptObjectCreationCache& creationCache) {
    int r;
    static const char* const strComponent = "Sprite";
    r = engine->RegisterObjectType(strComponent, sizeof(SpriteScripted), asOBJ_REF | asOBJ_GC); assert(r >= 0);
    r = engine->RegisterObjectBehaviour(strComponent, asBEHAVE_FACTORY, "Sprite@ f()", asMETHOD(ScriptObjectCreationCache, SSFactory), asCALL_THISCALL_ASGLOBAL, &creationCache); assert( r >= 0 );
    ....
}

 

 

it seems to work but I still have yet to run the angel script unit tests.


#3izackp

Posted 01 March 2013 - 06:12 AM

No not really... I ended up hacking it in by adding an extra parameter to the registerObjectBehavior function so now I can do this:
 

void SpriteScripted::registerAS(asIScriptEngine* engine, ScriptObjectCreationCache& creationCache) {
    int r;
    static const char* const strComponent = "Sprite";
    r = engine->RegisterObjectType(strComponent, sizeof(SpriteScripted), asOBJ_REF | asOBJ_GC); assert(r >= 0);
    r = engine->RegisterObjectBehaviour(strComponent, asBEHAVE_FACTORY, "Sprite@ f()", asMETHOD(ScriptObjectCreationCache, SSFactory), asCALL_THISCALL_ASGLOBAL, &creationCache); assert( r >= 0 );
    ....
}

 

 

it seems to work but I still have yet to run the angel script unit tests.


#2izackp

Posted 01 March 2013 - 06:11 AM

No not really... I ended up hacking it in by adding an extra parameter to the registerObjectBehavior function so now I can do this:
 

void SpriteScripted::registerAS(asIScriptEngine* engine, ScriptObjectCreationCache& creationCache) {
    int r;
    static const char* const strComponent = "Sprite";
    r = engine->RegisterObjectType(strComponent, sizeof(SpriteScripted), asOBJ_REF | asOBJ_GC); assert(r >= 0);
    r = engine->RegisterObjectBehaviour(strComponent, asBEHAVE_FACTORY, "Sprite@ f()", asMETHOD(ScriptObjectCreationCache, SSFactory), asCALL_THISCALL_ASGLOBAL, &creationCache); assert( r >= 0 );
}

 

 

it seems to work but I still have yet to run the angel script unit tests.


#1izackp

Posted 01 March 2013 - 06:11 AM

No not really... I ended up hacking it in by adding an extra parameter to the registerObjectBehavior function so now I can do this:
 

void SpriteScripted::registerAS(asIScriptEngine* engine, ScriptObjectCreationCache& creationCache) {
    int r;
    static const char* const strComponent = "Sprite";
    r = engine->RegisterObjectType(strComponent, sizeof(SpriteScripted), asOBJ_REF | asOBJ_GC); assert(r >= 0);
    r = engine->RegisterObjectBehaviour(strComponent, asBEHAVE_FACTORY, "Sprite@ f()", asMETHOD(ScriptObjectCreationCache, SSFactory), asCALL_THISCALL_ASGLOBAL, &creationCache); assert( r >= 0 );
}

 

 

it seems to work but i still yet run the angel script unit tests.


PARTNERS