Closed kion-dgl closed 1 month ago
This might be a "do all the things" issue. i might need to narrow down the scope of this issue. I think the place to start is to try and move the reading and writing functions into a file so that they can reflect the other.
For each version of megaman's model we could have a test where the model gets decoded into a .obj
, and then a test that reads the .obj
and encodes the model back into a .bin
file.
flowchart LR
A[BIN]
B[Reader]
C[OBJ]
D(Header)
E(Triangles)
F(Quads)
G(Verts)
A-->B
B-->D
D-->E
D-->F
D-->G
E-->C
F-->C
G-->C
One point to make note of is that we should probably make note of the direction for the term Reader
and Writer
. Reader
is "read from the game format". Writer
is "write to the game format".
flowchart LR
A[BIN]
B[Writer]
C[OBJ]
D(Header)
E(Triangles)
F(Quads)
G(Verts)
D-->A
E-->D
F-->D
G-->D
B-->E
B-->F
C-->B
B-->G
Probably the scope of this issue is to try and clean up the lower level functions. Like everywhere that uses vertices should be updated to use a single module.
I've been taking the approach of using tests to confirm functionality, and then copying and pasting the same code everywhere as needed. The scope of this issue is to go through the application and update the tests to import and test modules to keep everything consistent and easier to find.