Skip to content

refactor: Decouple and remove Renegade's WWSaveLoad library - #3551

Open
xezon wants to merge 6 commits into
TheSuperHackers:mainfrom
xezon:xezon/remove-wwsaveload
Open

xezon wants to merge 6 commits into
TheSuperHackers:mainfrom
xezon:xezon/remove-wwsaveload

Conversation

@xezon

@xezon xezon commented Oct 18, 2026 •

Copy link
Copy Markdown

Merge with Rebase

This change decouples and removes the legacy Renegade's WWSaveLoad library. It is split into several commits for clean separation of steps.

This library was an old Save format that is not used in Generals. Generals uses Xfer.

WWSaveLoad used chunkio (ChunkLoadClass, ChunkSaveClass). W3D models use the same chunkio. But all that was removed is not related to W3D models.

AI Use

This change was generated with collaboration of Claude Opus 5.5.

TODO

  • Add pull id to commit titles

@xezon xezon added this to the Code foundation build up milestone Oct 18, 2026
@xezon xezon added Major Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing labels Oct 18, 2026
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Organization UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5e14316d-2a79-4e8f-bc14-d7a92aa6302e
📥 Commits

Reviewing files that changed from the base of the PR and between 009cb94 and 6847fb3.

📒 Files selected for processing: 3
  • Core/Libraries/Source/WWVegas/WWMath/CMakeLists.txt
  • Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp
  • Tests/Google/Core/CMakeLists.txt
💤 Files with no reviewable changes: 2
  • Core/Libraries/Source/WWVegas/WWMath/CMakeLists.txt
  • Core/Libraries/Source/WWVegas/WWMath/wwmath.cpp

Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 3 remain after this review.

Walkthrough

The change removes the WWSaveLoad library and related persistence interfaces from WWMath, WWAudio, and WW3D. Sound render-object definitions now store and serialize sound settings directly. W3DView’s sound-definition-library controls and loading path are removed, and tests cover sound-definition serialization.

Changes

Persistence and build cleanup

Layer / File(s) Summary
Remove WWSaveLoad library and build references
Core/Libraries/Source/WWVegas/CMakeLists.txt, Core/Libraries/Source/WWVegas/WWSaveLoad/*, Generals/.gitignore, GeneralsMD/.gitignore
The WWSaveLoad library, definition and parameter APIs, and persistence framework are deleted. The library is no longer added or linked by the WWVegas build.
Remove WWMath persistence
Core/Libraries/Source/WWVegas/WWMath/*
Curve, spline, culling, and lookup-table persistence code is removed. LookupTableMgrClass::Get_Table now searches registered tables and returns nullptr when there is no match.
Remove audio and render persistence
Core/Libraries/Source/WWVegas/WWAudio/*, Core/Libraries/Source/WWVegas/WW3D2/*, Generals/Code/Libraries/Source/WWVegas/WW3D2/*, GeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/*
Persistence factories, save/load methods, and persistence declarations are removed from audio and render classes. The corresponding persistence chunk ID headers are also removed.

Sound settings and tool updates

Layer / File(s) Summary
Store and serialize sound settings
Core/Libraries/Source/WWVegas/WW3D2/soundrobj.*, Core/Libraries/Source/WWVegas/WWAudio/AudibleSound.*, Core/Libraries/Source/WWVegas/WWAudio/WWAudio.*
SoundRenderObjDefClass stores sound settings and metadata, creates sounds from those settings, and reads and writes definition chunks. Definition-based audible sound APIs and implementations are removed.
Update W3DView and validate serialization
Core/Tools/W3DView/AnimatedSoundOptionsDialog.*, Core/Tools/W3DView/SoundEditDialog.cpp, Core/Tools/W3DView/W3DView.rc, Tests/Google/Core/Libraries/WWVegas/WW3D2/soundrobj_test.cpp, Tests/Google/*/CMakeLists.txt
W3DView removes the sound-definition-library controls and loading path. Sound editing assigns an audible sound directly. Tests cover byte-for-byte round trips, unknown variables, and default settings.

Priority: ➖ Normal

Estimated code review effort: 4 (Complex) | ~60 minutes

Change: Refactor

Suggested reviewers: cryotherenegade

Merge Risk: ⚪ Minimal · up to 6847f

The legacy WWSaveLoad path is removed, while the retained spline APIs remain available to consumers that reference them. No concrete user-facing regression is established, so the change appears ready to merge subject to normal checks.

Pre-merge checks: Passed 4
Check name Status Explanation
Description check Passed The description directly explains the removal of the legacy WWSaveLoad library and clarifies that Generals uses Xfer while W3D model chunk I/O remains.
Title check Passed The title clearly and concisely identifies the main change: decoupling and removing Renegade's WWSaveLoad library.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@greptile-apps

greptile-apps Bot commented Oct 18, 2026 •

Copy link
Copy Markdown

RetriggerView in GreptileConfidence Score: 5/5

[Medium impact] The PR appears safe to merge; no actionable defects or repository-rule violations were found.

Summary

Removes Renegade’s WWSaveLoad library and its unused persistence interfaces from audio, math, and rendering code.

  • W3D sound objects save their settings directly in asset files.
  • Audio objects no longer expose Renegade’s legacy save and load hooks.
  • Math objects drop legacy persistence and file-loading paths.
  • Render objects in both Generals editions drop legacy persistence hooks.
  • The unused WWSaveLoad library and its build target are removed.

No actionable issues were found. Checks were based on code inspection; builds and tests were not run. No previous review threads were supplied. The previous-review ancestry checks failed, so the full PR diff was reviewed.

Diagram

%%{init: {'theme': 'neutral'}}%%
flowchart LR
    File[W3D sound file] --> Chunk[WWLib chunk reader]
    Chunk --> Definition[SoundRenderObjDefClass settings]
    Definition --> Save[WWLib chunk writer]
    Save --> File
    Definition --> Audio[WWAudio sound]
    Audio --> Object[SoundRenderObjClass]
Loading

Reviews (2) · Last reviewed commit: "refactor(wwsaveload): Delete the WWSaveL..." · Reviewed by Greptile

xezon added 6 commits October 18, 2026 20:31
…ect chunk

Pins the bytes of W3D_CHUNK_SOUNDROBJ that W3DView saves and loads, so that the sound
definition can move out of WWSaveLoad without changing the file format. The test
executables link WWAudio for it.
…at created them

SoundRenderObjClass::operator= (reached through Clone, for example when an HLOD is
copied) and the W3DView Sound Edit dialog create a sound from a definition on the stack,
and the sound kept that pointer. AudibleSoundClass::Play then read the destroyed
definition to create a logical sound and to fire the display text callback. Neither has
a receiver: no logical listener is ever created and no text callback is ever registered.
WWAudioClass created sounds by definition ID or name from DefinitionMgrClass, and
nothing called these functions. W3DView filled DefinitionMgrClass from a Renegade
definition database (.ddb) set in the Animated Sound Options dialog, and nothing read
the loaded definitions. The dialog loses its Sound Preset Library Path field.
…ndRenderObjDefClass

The W3D_CHUNK_SOUNDROBJ_DEFINITION chunk was written by AudibleSoundDefinitionClass, a
WWSaveLoad DefinitionClass that remained only for this. SoundRenderObjDefClass now holds
the sound settings and reads and writes the same bytes itself, including the ID and name
in the base class chunk. AudibleSoundDefinitionClass is removed, and
SoundRenderObjClass::Set_Sound takes the sound object.
…io, WWMath and WW3D2

RenderObjClass, the curves and the sounds derive from PersistClass and register persist
factories, and the sound scene has save and load subsystems, but nothing ever saves or
loads through them; the game saves through GameState and Xfer. This removes the
PersistClass bases, the factories and the Save/Load functions they dispatch to, the
persist chunk ID headers, the force links that only kept the factories linked, and the
loading of lookup tables from files. It also removes the chunk save and load of the
scene settings and of the AABTree and grid cull systems, which only Renegade's level
saves called, and AABTreeSoundCullClass, which only implemented the AABTree cull
system's save hooks and derives from a class that no longer exists.
Nothing includes or links WWSaveLoad anymore.
@xezon
xezon force-pushed the xezon/remove-wwsaveload branch from 009cb94 to 6847fb3 Compare October 18, 2026 18:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Major Severity: Minor < Major < Critical < Blocker Refactor Edits the code with insignificant behavior changes, is never user facing

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant