Skip to content

Document mnDiagram distance and number formatting helpers - #3445

Merged
itsgrimetime merged 4 commits into
doldecomp:masterfrom
itsgrimetime:pr/mndiagram-numeric-helper-docs
Sep 13, 2026
Merged

itsgrimetime merged 4 commits into
doldecomp:masterfrom
itsgrimetime:pr/mndiagram-numeric-helper-docs

Conversation

@itsgrimetime

@itsgrimetime itsgrimetime commented Sep 11, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • document the five mnDiagram distance and number-formatting helpers at their declarations in mndiagram.h
  • remove inaccurate inline claims about display units, caps, and time formatting
  • align the mnDiagram_FormatDecimalNumber prototype parameter name with its definition
  • keep symbol documentation inline, following the layout agreed in Doxygen gotchas #2938; this PR adds no .dox redeclarations

Runtime validation

The documented boundary and formatting contracts were checked with 73 controlled Dolphin 2509 / GALE01 v1.02 cases, including both saved-language branches.

Build verification

  • rebased onto current upstream/master
  • ninja
  • python configure.py progress
  • 1130/1130 objects matching and linked
  • rebuilt DOL SHA-1: 08e0bf20134dfcb260699671004527b2d6bb1a45
  • git diff --check
  • clang-format clean

@itsgrimetime
itsgrimetime marked this pull request as ready for review September 11, 2026 06:42
@decomp-dev

decomp-dev Bot commented Sep 11, 2026

Copy link
Copy Markdown

Report for GALE01 (f7cf71c - 30063ed)

No changes

@ribbanya ribbanya left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I'm not sure this is something we want to do, see #2938. We might be forced to place documentation at the definition. I'm not really sure what the best layout is but it's not great to churn one way and then the other. We need to look more at how large/stable codebases are handling this problem.

@ribbanya

Copy link
Copy Markdown
Collaborator

The main reason for using .dox files was to document struct fields separate from the definition, mostly because HAL likes to declare 2000-line structs that are annoying to wade through if each field also has multi-line documentation. I really don't know what the best solution is.

@itsgrimetime

Copy link
Copy Markdown
Collaborator Author

makes sense. i'll play around with some stuff and do some thinking as well and see if I can't come up with some ideas

@itsgrimetime
itsgrimetime marked this pull request as draft September 11, 2026 07:05
@itsgrimetime
itsgrimetime force-pushed the pr/mndiagram-numeric-helper-docs branch from 9bd82e4 to 2d16c14 Compare September 12, 2026 05:34
@itsgrimetime itsgrimetime added the ai-assisted Utilizes a LLM to do the heavy lifting label Sep 12, 2026
Document the diagram distance and formatting helpers above their prototypes
in mndiagram.h and remove inaccurate inline claims about display units, caps,
and time formatting from mndiagram.c. Align the mnDiagram_FormatDecimalNumber
prototype's parameter name with its definition (decimal_places).

Validated the documented boundary and formatting contracts with 73 controlled
Dolphin 2509 / GALE01 v1.02 cases, including both saved-language branches.

main.dol OK; mndiagram, mndiagram2, and mndiagram3 remain 100% matched.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@itsgrimetime
itsgrimetime force-pushed the pr/mndiagram-numeric-helper-docs branch from 2d16c14 to 0e2988d Compare September 12, 2026 17:41
@itsgrimetime

Copy link
Copy Markdown
Collaborator Author

Updated this onto current master. The helper documentation now lives on the real declarations in mndiagram.h, with no external .dox redeclarations, following the symbol-documentation layout agreed in #2938. The rebased branch still reproduces the expected DOL and remains 100% matched/linked.

@itsgrimetime
itsgrimetime marked this pull request as ready for review September 12, 2026 17:41
@itsgrimetime
itsgrimetime enabled auto-merge (squash) September 13, 2026 05:29
@itsgrimetime
itsgrimetime merged commit c6e2e0e into doldecomp:master Sep 13, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ai-assisted Utilizes a LLM to do the heavy lifting

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants