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

Cleanup comments in save & load related files #352

Closed
wants to merge 24 commits into from

Conversation

JeodC
Copy link
Collaborator

@JeodC JeodC commented May 15, 2024

Pull Request Type

  • GitHub Workflow changes
  • Documentation or Wiki changes
  • Build and Dependency changes
  • Runtime changes
    • Render changes
    • Audio changes
    • Input changes
    • Network changes
    • Other changes

Description

  • Remove commented code
  • Move versioning comments to header
  • Add comments in gamesave.cpp for readability

ziplantil and others added 8 commits May 12, 2024 18:07
This definition was used to control the accessibility of some class members, changing protected qualifiers to public. This introduced unnecessary coupling between components and headers.

All conditional access specifiers have been set to public, which should not be a problem given the low number of classes that actually used affected members. Another albeit more complex solution could have been to use friend classes.
D3 used to support Aureal 3-Dimensional sound cards, providing 3D spatial audio. The hardware and drivers is outdated, so all support in code has been removed, including UI mixer setting.

Read more about A3D here: https://en.wikipedia.org/wiki/Aureal_Semiconductor#A3D
- Remove commented code
- Move versioning comments to header
- Add comments in gamesave.cpp for readability
@JeodC JeodC added the cleanup Code cleanup label May 15, 2024
Descent3/gamesave.cpp Outdated Show resolved Hide resolved
//@@ // movement info.
//@@ switch (op->movement_type)
//@@ {
//@@ case MT_SHOCKWAVE:
Copy link
Collaborator

Choose a reason for hiding this comment

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

do you have any idea what this whole code block could have been for?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If you search @ you'll find a lot of files with commented blocks like this one. In this block, it looks like old loading code that was replaced.

JeodC and others added 16 commits May 15, 2024 10:37
Remove DDAccess.h header, and associated DD_ACCESS_RING definition
Remove unused cf_ReadHogFileEntry() function.
All functions, that uses cf_ReadBytes(), checks return size, but don't handle potential exceptions. That leads to segfaults on reading of damaged files (i.e. broken savegames).
replace md5 with custom implementation, with tests
Converted line endings to Unix format to match .gitattributes file
…escent3 into gamesave-cleanup"

This reverts commit 718d3d9, reversing
changes made to 56e6127.
@JeodC JeodC closed this May 18, 2024
@JeodC JeodC deleted the gamesave-cleanup branch May 18, 2024 00:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cleanup Code cleanup
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants