Repository navigation
dat: size vertex arrays from display lists - #3653
itsgrimetime wants to merge 7 commits into
Conversation
5885e34 to
450eed9
Compare
ac38932 to
09e2137
Compare
There was a problem hiding this comment.
This file is a horrible mess, which is my fault, but sometime soon it needs to be refactored. It's intended to be a thin runtime layer to load archives for a native port, and the complex per-type parsing is generated as C by the Rust code. Instead it's directly duplicating a large portion of the Rust archive code, which is introducing an insane amount of churn and bloat to this file. The runtime codegen was hastily thrown together and I think my Claude misunderstood what I wanted to do with archive.c, and now yours is just running wild with it. I would fix it myself but I really won't have time anytime soon.
Maybe fix in a separate PR, but just know that this is causing issues in every subsequent iteration of the tool until it's fixed.
There was a problem hiding this comment.
archive.c should have absolutely no idea what anything in the dwarf markup is. It should be a native port of baselib/archive.c and lbarchive.c and then as I said, more specific interpretations of public symbols can be generated during the cmake build process.
There was a problem hiding this comment.
I can do the refactor in a different PR, I understand what you're going for, then will update this one after that refactor lands
0c64ac7 to
cb33ec4
Compare
Expressions evaluate to bytes as well as integers: a pointer field whose own DAT_COUNT or DAT_TERMINATED gives its length is the data it points to, which calls and DAT_BIND take. GXMaxIndex decodes a display list with its vertex descriptors and returns an attribute's largest index; HSD_PObjDesc binds its display lists and descriptors, and HSD_VtxDescList.vertex counts (largest index + 1) * stride. Descriptor lists several shapes share recount their arrays for each shape, so a shared array is as long as the longest. Mirrored in the native walker, with unit tests in both. Also create obj/<dir> before compiling a unit's samples. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Compile byte-valued bindings and expressions into C readers. Recount shared descriptor arrays under each display-list context, retaining extent fallbacks without restoring the annotation interpreter. Co-authored-by: Robin Avery <robin@ribbanya.dev>
cb33ec4 to
be6fad4
Compare
Uh oh!
There was an error while loading. Please reload this page.