refactor(particlesys): Parse IsGroundAligned as an enum instead of a boolean - #3265
refactor(particlesys): Parse IsGroundAligned as an enum instead of a boolean#3265stephanmeesters wants to merge 4 commits into
Conversation
3d6ab7a to
a83386b
Compare
PR Summary by QodoParse particle ground alignment as an extensible enum
AI Description
Diagram
High-Level Assessment
Files changed (6)
|
|
| Filename | Overview |
|---|---|
| Core/GameEngine/Include/GameClient/ParticleSys.h | Defines the alignment enum, INI value names, renamed state field, and billboard query. |
| Core/GameEngine/Source/GameClient/System/ParticleSys.cpp | Initializes, parses, copies, evaluates, and version-serializes the new alignment representation. |
| Core/GameEngineDevice/Source/W3DDevice/GameClient/W3DParticleSys.cpp | Uses the common billboard query when accounting for ground-aligned area-effect particles. |
| Core/Tools/ParticleEditor/ParticleEditorDialog.cpp | Maps the editor’s existing alignment checkbox to the two current enum values. |
| Generals/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp | Exports the Generals particle alignment using the enum’s canonical INI name. |
| GeneralsMD/Code/GameEngine/Source/GameLogic/ScriptEngine/ScriptEngine.cpp | Mirrors the enum-based particle alignment export for Zero Hour. |
Flowchart
%%{init: {'theme': 'neutral'}}%%
flowchart LR
INI["IsGroundAligned = No / Yes"] --> Parse["parseIndexList"]
Parse --> Enum["ParticleAlignmentType"]
Enum --> Runtime["Particle system behavior"]
Enum --> Renderer["W3D batching and field count"]
Enum --> Editor["ParticleEditor alignment switch"]
Enum --> Export["Generals and GeneralsMD INI export"]
Enum --> Save{"Transfer version"}
Save -->|"v1 / retail-compatible"| Boolean["Boolean compatibility mapping"]
Save -->|"v2"| EnumData["Enum serialization"]
Reviews (2): Last reviewed commit: "Update comments" | Re-trigger Greptile
Code Review by Qodo🐞 Bugs (0) 📘 Rule violations (0) 📎 Requirement gaps (0)
Great, no issues found!Qodo reviewed your code and found no material issues that require reviewTip of the day💡 Did you know, you can turn these tips off under Display preferences |
Parse the INI value
IsGroundAlignedas enum valuesNoandYesinstead of boolean. This will make it possible to setIsGroundAligned = CONFORMINGin the INI later.m_isGroundAlignedtom_particleAlignment.F_ISXYPLANARtoF_PARTICLEALIGNMENTParticleSystemInfoxfer version to handle the new enum save.Todo