Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

First attempt at adding in-code documentation #806

Merged
merged 21 commits into from
Apr 12, 2022

Conversation

Miepee
Copy link
Contributor

@Miepee Miepee commented Mar 26, 2022

This is the first batch / attempt of adding in-code documentation.
The following has been annotated so far:

  • UndertaleAnimationCurves.cs (except for channels)
  • UndertaleBackgrounds.cs (except for a few GMS2 specific things)
  • A bit of UndertaleCode.cs
  • UndertaleAudio.cs
  • UndertaleEmbeddedTexture.cs (except for the blob serializers)
  • UndertaleFont.cs (except for a few attributes)
  • UndertaleGameObject.cs (except for a few methods
  • Most of UndertaleGeneralInfo.cs
  • UndertaleGlobalInit.cs
  • Some of UndertaleRoom.cs
  • UndertaleScript.cs
  • Most of UndertaleShader.cs
  • UndertaleSound.cs
  • UndertaleSprite.cs except for most of the GMS2 stuff and padding methods.
  • UndertaleString.cs
  • UndertaleTextureGroupInfo
  • UndertaleTexturePageItem
  • UndertaleTimeline.cs
  • Most of UndertaleData.cs
  • A bit of UndertaleBaseTypes
  • Most of IScriptingInterface.cs

In addition, I also did the following changed to IScriptingInterface:

  • rename Make_New_File to MakeNewFile. This may break a few Scripts, I will check later if any are broken.
  • Put the implementation of SendAUMIMessage right into the scripting Interface.
  • Put the implementation AreFilesIdentical right into the scripting interface.
  • Rename IncProgress() AddProgressP and IncProgressP to IncrementProgress, AddProgressParallel and IncrementProgressParallel respectively. This likely breaks a few scripts, but I do not know which ones right now.
  • rename SyncBinding(bool enable = false); to DisableAllBindings()
  • rename StartUpdater and StopUpdater to StartProgressBarUpdater and StopProgressBarUpdater respectively. This likely breaks a few scripts, but I do not know which ones right now.
  • Put the implementation of the dummy methods right into the scripting interface.
  • Remove the parameter from RemovePromptChooseDirectory, as it's not used in the implementations.

In addition, I also added a lot of TODOs, which mostly indicate things that should still be documented before I put this PR out of Draft, but also some other structural changes that should be done.

Lastly, I also enabled it, so every public field which is undocumented shows up as a warning now.

Not related to the codebase, but somewhat to this PR. I put up a quick basic doxygen HTML render of the current documentation here, which may or may not help with reviewing:
https://miepee.github.io/UMTDoc/annotated.html

Miepee added 10 commits March 24, 2022 19:19
Background, font, globalinit, script, shader, sound, sprite.
- start documenting UndertaleCode
- document some gms2 stuff of UndertaleRoom.
- document texturepageItem
- document some missing IScriptInterface methods and rename some of them.
- document some missing UndertaleData properties and mehotds.
- document more in data
- finish timeline
- finish texturegroupinfo
- finish string
- finish sound
- finish script
- almost finish embeddedTexture
- finish embeddedAudio
- add a bit more in code
- slight tweaks to background and animationcurve.
@Miepee Miepee marked this pull request as ready for review March 27, 2022 19:34
@Miepee
Copy link
Contributor Author

Miepee commented Mar 27, 2022

I've fixed the big issues, so it's ready for review now.
There are still a few undocumented things in the models, but am not that knowledgeable on them.

UndertaleModTests/GameScriptTests.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Outdated Show resolved Hide resolved
UndertaleModLib/Scripting/IScriptInterface.cs Show resolved Hide resolved
@Grossley Grossley merged commit 20ab9b7 into UnderminersTeam:master Apr 12, 2022
@Miepee Miepee deleted the documentation branch May 8, 2022 07:34
ngyikp added a commit to chicory-pizza/objCustomDog that referenced this pull request Jul 31, 2022
Many breaking changes in latest bleeding-edge caused by UnderminersTeam/UndertaleModTool#806
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.

3 participants