TheOpenSpaceProgram / osp-magnum

A spaceship game
https://www.openspaceprogram.org/
MIT License
216 stars 32 forks source link

Documenting helper functions related to topData #280

Closed Ben-Bingham closed 6 months ago

Ben-Bingham commented 6 months ago

Added some documentation to some functions that add/get/reserve value in topData, no code was modified.

I tried to format the documentation in the same way that documentation was formatted in other parts of the codebase.

Ben-Bingham commented 6 months ago

I switched over the "param" portions of the macro docs to say "arglist" instead of both count and ID.

As jonesmz said in a previous comment count is needed for every call of the macro, so I will make another pull request that either changes the arguments in the macros to always include the count parameter, or as Capital-Asterisk suggested there are methods to count the number of arguments in a variadic argument, I will try to implement that method first.

If I can get it working with either method I will also update the documentation to still be accurate.

jonesmz commented 6 months ago

I wouldn't worry too much about rewriting the macro arguments.

Its enough to just document the "api" the implementation detail macros can use the shorthand notation without any issues

You can, of course, just don't consider that change a blocker for merging your PR.

I'll let cap merge it when its ready.