feat: Remove aircraft carrier debugging hack#2478
Open
githubawn wants to merge 1 commit intoTheSuperHackers:mainfrom
Open
feat: Remove aircraft carrier debugging hack#2478githubawn wants to merge 1 commit intoTheSuperHackers:mainfrom
githubawn wants to merge 1 commit intoTheSuperHackers:mainfrom
Conversation
- Removed KRIS_BRUTAL_HACK_FOR_AIRCRAFT_CARRIER_DEBUGGING macro. - Standardized MAX_GROUPS to 10 in W3DDisplayStringManager. - Removed debug numeral formatting and aircraft carrier deck indexing logic. - Cleaned up associated conditional includes and code blocks.
|
| Filename | Overview |
|---|---|
| Generals/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplayStringManager.h | Removes the commented-out KRIS_BRUTAL_HACK_FOR_AIRCRAFT_CARRIER_DEBUGGING macro and its conditional MAX_GROUPS definition, replacing the whole block with a simple #define MAX_GROUPS 10. Clean change — no behavioral impact as the macro was already inactive. |
| GeneralsMD/Code/GameEngineDevice/Include/W3DDevice/GameClient/W3DDisplayStringManager.h | Mirrors the Generals header change: removes the dead-code macro and conditional MAX_GROUPS block, leaving #define MAX_GROUPS 10 unconditionally. No behavioral change. |
| Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplayStringManager.cpp | Removes the #ifdef guarded debug path (Unicode format string for deck indices) leaving only the production AsciiString/TheGameText->fetch path. Minor: the three retained lines carry a residual leading space from their former #else-block indentation. |
| GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplayStringManager.cpp | Identical cleanup to the Generals counterpart. Same residual leading-space indentation artifact on the three retained lines. |
| GeneralsMD/Code/GameEngine/Source/GameClient/Drawable.cpp | Removes the conditional #include "GameLogic/Module/ParkingPlaceBehavior.h", the debug drawUIText() call inside drawIconUI(), and the full deck-index display block at the end of drawUIText(). drawUIText() itself is retained and continues to be called through the normal GameClient text-bearing drawable path. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[W3DDisplayStringManager::postProcessLoad] -->|loop i=0..MAX_GROUPS-1| B[newDisplayString]
B --> C[setFont]
C --> D["AsciiString::format('NUMBER:%d', i)"]
D --> E["setText(TheGameText->fetch(displayNumber))"]
F[GameClient render loop] -->|addTextBearingDrawable| G[Drawable::drawUIText]
G --> H{obj in group?}
H -->|yes| I[getGroupNumeralString / draw numeral]
H -->|no| J{obj in formation?}
J -->|yes| K[getFormationLetterString / draw letter]
subgraph REMOVED ["Removed debug path (was inside #ifdef)"]
R1["#include ParkingPlaceBehavior.h"]
R2["drawIconUI → drawUIText (extra call)"]
R3["drawUIText → deck-index display block"]
end
style REMOVED fill:#ffcccc,stroke:#cc0000
Prompt To Fix All With AI
This is a comment left during a code review.
Path: Generals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplayStringManager.cpp
Line: 86-88
Comment:
**Residual leading space in indentation**
After removing the `#ifdef`/`#else` wrapper, these three lines retained the leading space that preceded their tab indentation inside the `#else` block. The surrounding code (e.g. lines 84–85) uses tab-only indentation, so these lines are now inconsistently indented.
```suggestion
AsciiString displayNumber;
displayNumber.format("NUMBER:%d", i);
m_groupNumeralStrings[i]->setText(TheGameText->fetch(displayNumber));
```
How can I resolve this? If you propose a fix, please make it concise.
---
This is a comment left during a code review.
Path: GeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplayStringManager.cpp
Line: 86-88
Comment:
**Residual leading space in indentation**
Same whitespace artifact as the Generals counterpart — after removing the `#ifdef`/`#else` wrapper, these lines kept the leading space that was part of their original `#else`-block indentation. All surrounding lines in the loop use tab-only indentation.
```suggestion
AsciiString displayNumber;
displayNumber.format("NUMBER:%d", i);
m_groupNumeralStrings[i]->setText(TheGameText->fetch(displayNumber));
```
How can I resolve this? If you propose a fix, please make it concise.Last reviewed commit: "feat: Remove aircraf..."
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
feat: Remove aircraft carrier debugging hack
Removes legacy Aircraft Carrier debugging code that was originally introduced for temporary deck-logic troubleshooting. This hack was already inactive in the game as it was commented out in the source.
Reasoning: Cleaning up old development debt and removing logic that is no longer active or helpful. This reduces noise in the source files and simplifies the W3D initialization and rendering paths.