Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor handling of AnimatedObjects #794

Closed
wants to merge 1 commit into from
Closed

Conversation

leezer3
Copy link
Owner

@leezer3 leezer3 commented Jun 8, 2022

This PR refactors AnimatedObjects so that they are a subset of the overarching UnifiedObject

Required by #684 in order to get the HierarchyAnimatedObjects working correctly, as these require a totally different update method.

TODO:

  • Need to slim down and combine the methods.
  • Provide a virtual Update() method within the UnifiedObject
  • Can we get rid of some more of the excess parameters in some of these methods?
  • Possibly convert a bunch of the AnimatedObject booleans to a flags enum??

@leezer3
Copy link
Owner Author

leezer3 commented Jun 15, 2022

Hmm...

Structural issues are a major problem here :/
Far too much depending on being able to access deep within the CarSection / Elements.

This might want a rethink / major rework of the entire CarSection approach...

@leezer3
Copy link
Owner Author

leezer3 commented Jun 21, 2022

https://github.com/leezer3/OpenBVE/tree/CarSectionRefactor

Marginally tested rework of the CarSection, to be used as an alternative to this. Appears to work 'better' but I'm not at all convinced with the entire ObjectState concept :/
Quite a bit of reference chucking about too, which I'm not thrilled by....

I think this one should actually allow the HierarchyAnimatedObjects to be used in a CarSection, but may well break in new and interesting ways.....

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant