Wouldn't it be a GetRootObject function, since it's while loops up the hierarchy?Code:datum_index GetParentObject(datum_index obj)
{
object_header_datum* object_header_datums = Objects::ObjectHeader()->datums;
object_data* current_obj = (object_data*)object_header_datums[obj.index].address;
while( current_obj->GetParentObjectIndex()->index != NONE )
{
obj = *current_obj->GetParentObjectIndex();
current_obj = (object_data*)object_header_datums[obj.index].address;
}
return obj;
}
looks like coding is the easy part
finding the CONSTANTS, on the other hand...