You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A use case on 2ship for this is the ability to have an Array of CollisionPoly.
At a minimum, we would need a way to return a pointer to the start of the "array", and a way to query the array size.
On the port side we would create the CollisionPoly type, and I'm guessing some form of CollisionPolyFactory and some new Ship::ResourceFactoryBinaryArray.
If Ship::Array remains as an actual resource that implements ReadResource, then the CollisionPolyFactory would probably need a new type of "read" method that can be passed in the current reader as part of some loop within the Array factory. Then the Array resource would manage the memory (destructing each CollisionPoly when the Array is destructed).
If Ship::Array becomes some kind of template, then the CollisionPolyFactory would become solely responsible for reading the full resource. Presumably this would require registering this uniquely with the resource manager and have dedicated meta init data.
What I'm not fully aware of is what would be "registered" and what would go in the init meta data.
(This is just my random thoughts on the matter, but there is probably other ways to handle this as well)
instead of having a bunch of hardcoded types in Array we could make it a template so ports can use it for any of their resource types
i think this could be done in a generic enough way to get it into the
Ship::
namespaceThe text was updated successfully, but these errors were encountered: