But for the actor type, how would I construct things? That's what I'm asking. How do I get it so that the array within the array knows what parent struct array index it's accessing t_data from? t_data is a static size, btw.
Like, this obviously doesn't work:
asEngine->RegisterObjectProperty("actor_t", "int32_t t_data[10]", asOFFSET(actor_t, t_data));
// actor_t
asEngine->RegisterObjectType("actor_t", sizeof(actor_t), asOBJ_VALUE | asOBJ_POD | asGetTypeTraits<actor_t>());
//asEngine->RegisterObjectProperty("actor_t", "int32_t t_data[10]", asOFFSET(actor_t, t_data)); <- Can't access this. I need to be able to do actor[idx].t_data[idx2]; in AngelScript. I need my C++ program to know which index of the base actor[] to get t_data from.
asEngine->RegisterObjectProperty("actor_t", "uint32_t flags", asOFFSET(actor_t, flags));
asEngine->RegisterObjectProperty("actor_t", "vec3_t bpos", asOFFSET(actor_t, bpos));
asEngine->RegisterObjectProperty("actor_t", "int32_t floorz", asOFFSET(actor_t, floorz));
asEngine->RegisterObjectProperty("actor_t", "int32_t ceilingz", asOFFSET(actor_t, ceilingz));
asEngine->RegisterObjectProperty("actor_t", "vec2_t lastv", asOFFSET(actor_t, lastv));
asEngine->RegisterObjectProperty("actor_t", "int16_t htpicnum", asOFFSET(actor_t, htpicnum));
asEngine->RegisterObjectProperty("actor_t", "int16_t htang", asOFFSET(actor_t, htang));
asEngine->RegisterObjectProperty("actor_t", "int16_t htextra", asOFFSET(actor_t, htextra));
asEngine->RegisterObjectProperty("actor_t", "int16_t htowner", asOFFSET(actor_t, htowner));
asEngine->RegisterObjectProperty("actor_t", "int16_t movflag", asOFFSET(actor_t, movflag));
asEngine->RegisterObjectProperty("actor_t", "int16_t tempang", asOFFSET(actor_t, tempang));
asEngine->RegisterObjectProperty("actor_t", "int16_t timetosleep", asOFFSET(actor_t, timetosleep));
asEngine->RegisterObjectProperty("actor_t", "int16_t stayput", asOFFSET(actor_t, stayput));
asEngine->RegisterObjectProperty("actor_t", "int8_t floorzoffset", asOFFSET(actor_t, floorzoffset));
asEngine->RegisterObjectProperty("actor_t", "int8_t waterzoffset", asOFFSET(actor_t, waterzoffset));
asEngine->RegisterObjectProperty("actor_t", "int16_t dispicnum", asOFFSET(actor_t, dispicnum));
asEngine->RegisterObjectProperty("actor_t", "uint8_t cgg", asOFFSET(actor_t, cgg));
asEngine->RegisterObjectProperty("actor_t", "uint8_t lasttransport", asOFFSET(actor_t, lasttransport));
asEngine->RegisterObjectType("actorarray_t", 1, asOBJ_REF | asOBJ_NOHANDLE);
asEngine->RegisterObjectMethod("actorarray_t", "actor_t &opIndex(uint32_t idx)", asFUNCTION(asOpIndex_actor), asCALL_CDECL_OBJLAST);
asEngine->RegisterGlobalProperty("actorarray_t actor", &dummyPtr);