Skip to content

Boilerplate, Refactors, Resource Hygiene#9

Merged
JeBobs merged 18 commits into
BurnoutHints:mainfrom
Adriwin06:boilerplate-refactor
Apr 21, 2026
Merged

Boilerplate, Refactors, Resource Hygiene#9
JeBobs merged 18 commits into
BurnoutHints:mainfrom
Adriwin06:boilerplate-refactor

Conversation

@Adriwin06
Copy link
Copy Markdown
Member

@Adriwin06 Adriwin06 commented Apr 20, 2026

Refactors to resources:

  • GuiPopup
  • Model
  • Splicer
  • InstanceList
  • SnapshotData
  • EnvironmentTimeLine (+ added export support)

For the above resources:
Improved 64 bit-reading and writing support (thanks to the new boilerplate)
Some of them were almost entirely rewritten, bringing them to be basically identical to their input formats now

Added resource-wide boilerplate for getting external imports
Added the ability to write external imports on export, with a few modes:

  • yaml-based imports file (YAP-formatted)
  • binary inline block (appended to the end of the resource data, akin to non-YAP tools)
  • separate imports binary dat (akin to how bndl 1 tools work, or if people are using my ImportToYaml tool in their workflow)

Entirely refactored ResourceFactory and how resource type/platform registration works
New utilities to run external processes from inside volatility
Added Transform to Matrix44Affine serialization
Added more error checking in most areas of the tool
Housekeeping

@JeBobs JeBobs changed the title Codex boilerplate refactor Boilerplate, Refactors, Resource Hygiene Apr 21, 2026
@JeBobs JeBobs marked this pull request as ready for review April 21, 2026 19:33
@JeBobs JeBobs merged commit a646af2 into BurnoutHints:main Apr 21, 2026
3 of 4 checks passed
Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f5f1413a71

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +128 to +130
long importBlockOffset = Math.Max(
(long)keyframeTimesPtr + (keyframeCount * KeyframeTimeSize),
(long)keyframeRefsPtr + (keyframeCount * KeyframeReferencePlaceholderSize));
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 Badge Align import-block lookup with aligned write offset

WriteToStream writes the keyframe import table at a 16-byte-aligned importsOffset, but ReadLocation computes importBlockOffset as the unaligned max of the keyframe arrays. When a location has a keyframe count not divisible by 4 (for example, 1), the parser starts scanning 12 bytes before the real table, steps in 16-byte increments, and misses every import entry; this causes exported EnvironmentTimeline files to round-trip with missing ResourceReference IDs.

Useful? React with 👍 / 👎.

Comment on lines +20 to +21
output.Append(process.StandardOutput.ReadToEnd());
output.Append(process.StandardError.ReadToEnd());
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Drain both redirected streams concurrently

RunAndCapture reads stdout to completion before reading stderr, which can deadlock when the child process writes enough to stderr to fill its pipe while stdout is still being drained. This regression now affects shader compilation paths using ProcessUtilities.RunAndCapture, where verbose compiler errors can hang the export command instead of returning a failure.

Useful? React with 👍 / 👎.

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.

2 participants