You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR removes Xbox-specific (_XBOX) conditional compilation code from the WW3D2 rendering library shared between Command & Conquer Generals and Generals Zero Hour. It relates to #2499 and is part of a broader cleanup effort.
Key changes:
codex.h / gimex.h: Drops !defined(_XBOX) guard from the GCALL / __stdcall definition, now unconditionally applying __stdcall on MSVC (correct for PC).
ww3dformat.h: Removes the four Xbox-linear depth/stencil enum values (WW3D_ZFORMAT_LIN_*) and their handling in ww3dformat.cpp switch statements.
formconv.cpp: Collapses the #ifndef _XBOX / #else / #endif blocks around the Z-format conversion array initializer and the HIGHEST_SUPPORTED_D3D*FORMAT macro definitions to the PC-only branch.
texture.cpp: Removes the Xbox guard around GetPriority() / SetPriority() calls.
Both dx8wrapper.cpp copies: Removes already-commented-out // #ifndef _XBOX / // #endif // XBOX lines and the dead XBOX branch for Vertex_Processing_Behavior in GeneralsMD.
All removals are internally consistent: the enum values removed from the header are also removed from all switch statements and conversion arrays. No logic changes are introduced for PC builds.
Confidence Score: 5/5
Safe to merge — all changes are pure removal of dead Xbox code; no logic modifications to any PC code path.
Every deletion in this PR was already inactive on PC: the _XBOX macro was never defined for this target, the commented-out guards were already no-ops, and the removed enum values were guarded by #ifdef _XBOX. The array size in formconv.cpp and the switch coverage in ww3dformat.cpp remain consistent after the removals. No P0 or P1 findings were identified.
No files require special attention.
Important Files Changed
Filename
Overview
Core/Libraries/Source/WWVegas/WW3D2/ww3dformat.h
Removes four Xbox-linear Z-format enum values; WW3D_ZFORMAT_COUNT now correctly reflects PC-only formats.
Core/Libraries/Source/WWVegas/WW3D2/formconv.cpp
Collapses Xbox/PC ifdef branches in the Z-format conversion array and macro definitions; array size now matches the updated enum count.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
RefactorEdits the code with insignificant behavior changes, is never user facing
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.