Replies: 2 comments 3 replies
-
|
Are there examples of said types? There should only be "Skeleton", "Background" and "Multi" afaik. |
Beta Was this translation helpful? Give feedback.
3 replies
-
|
I wrote down public modifier parts of current structure. It is about mdlx parsers. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment




Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
MDLX major refactor
Why
The current
Mdlximplementation is fundamentally badly designed.A MDLX is a file extension that is internally stored as a BAR file. yet the
Kh2.Mdlxparser does operate on a file within a MDLX file. It does not make much sense. TheKh2.Mdlxreally is a model parser.Kingdom Hearts II has different model types:
Each of them contains their own fields, flags and properties and they share very little in common. Yet our current
Kh2.Mdlxtries to do everything. This lead the introduction ofKh2.Mdlx.IsEntityandKh2.Mdlx.IsMapto circumnavigate the bad design of the parser.How
Separate each model type into their own class (eg.
ModelLegacy,ModelBackground) and let them implement the abstracted classModel.Model.ReadandModel.Writewill parse and write a model file as usual, but internally they will use the appropriate implementation based on the model type.Modelneeds to have virtual methods such asGetDrawPolygonCountandGetDrawChain. The methodGetDrawChainwill be extremely important as it will completely abstract from the draw engine how models are supposed to be rendered. The draw engine will just get a draw chain from the model and render it, unaware of the underlying implementation.My suggestion is to slowly transition to the new format. Create
Modeland the underlying model types and wrap them into the existingMdlxparser. OnceMdlxbecomes no more than an empty shell, delete it and exposeModeldirectly.Beta Was this translation helpful? Give feedback.
All reactions