Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the
Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. WalkthroughThe pull request adds DX8-backed operations to ChangesRenderer API migration
Estimated code review effort: 4 (Complex) | ~60 minutes Change: Refactor Suggested reviewers: Merge Risk:
|
6799d9d to
320de51
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Organization UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
11bcce38-79c1-42a0-960d-985839ec6db1
📥 Commits
Reviewing files that changed from the base of the PR and between 2119cc9 and 320de5106774f6cd0c22d5210f155bd03dade263.
📒 Files selected for processing (62)
Core/GameEngineDevice/Source/W3DDevice/GameClient/BaseHeightMap.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/FlatHeightMap.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/HeightMap.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DDebugIcons.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DDisplay.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DScorch.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DShaderManager.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DSmudge.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DSnow.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainBackground.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DTerrainTracks.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DTreeBuffer.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/W3DView.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWater.cppCore/GameEngineDevice/Source/W3DDevice/GameClient/Water/W3DWaterTracks.cppCore/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.cppCore/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.hCore/Libraries/Source/WWVegas/WW3D2/Backend/RenderBackend.hCore/Libraries/Source/WWVegas/WW3D2/CMakeLists.txtCore/Libraries/Source/WWVegas/WW3D2/IRenderBackend.hCore/Libraries/Source/WWVegas/WW3D2/Renderer.hCore/Libraries/Source/WWVegas/WW3D2/dx8polygonrenderer.hCore/Libraries/Source/WWVegas/WW3D2/dx8renderer.cppCore/Libraries/Source/WWVegas/WW3D2/dx8wrapper.hCore/Libraries/Source/WWVegas/WW3D2/dynamesh.cppCore/Libraries/Source/WWVegas/WW3D2/line3d.cppCore/Libraries/Source/WWVegas/WW3D2/matpass.cppCore/Libraries/Source/WWVegas/WW3D2/pointgr.cppCore/Libraries/Source/WWVegas/WW3D2/ringobj.cppCore/Libraries/Source/WWVegas/WW3D2/seglinerenderer.cppCore/Libraries/Source/WWVegas/WW3D2/sortingrenderer.cppCore/Libraries/Source/WWVegas/WW3D2/sphereobj.cppCore/Libraries/Source/WWVegas/WW3D2/streakRender.cppCore/Libraries/Source/WWVegas/WW3D2/texproject.cppCore/Libraries/Source/WWVegas/WW3D2/ww3d.cppCore/Libraries/Source/WWVegas/WW3D2/ww3d.hCore/Tools/W3DView/GammaDialog.cppCore/Tools/W3DView/MainFrm.cppCore/Tools/W3DView/ScreenCursor.cppGenerals/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cppGenerals/Code/Libraries/Source/WWVegas/WW3D2/camera.cppGenerals/Code/Libraries/Source/WWVegas/WW3D2/render2d.cppGenerals/Code/Libraries/Source/WWVegas/WW3D2/scene.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DProjectedShadow.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/Shadow/W3DVolumetricShadow.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DBibBuffer.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DBridgeBuffer.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DInGameUI.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DRoadBuffer.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DScene.cppGeneralsMD/Code/GameEngineDevice/Source/W3DDevice/GameClient/W3DStatusCircle.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/boxrobj.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/camera.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/dazzle.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/decalmsh.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/linegrp.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/mapper.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/mesh.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/render2d.cppGeneralsMD/Code/Libraries/Source/WWVegas/WW3D2/scene.cppGeneralsMD/Code/Tools/WorldBuilder/src/DrawObject.cppGeneralsMD/Code/Tools/WorldBuilder/src/ObjectPreview.cpp
💤 Files with no reviewable changes (4)
- Core/Libraries/Source/WWVegas/WW3D2/Backend/RenderBackend.h
- Core/Libraries/Source/WWVegas/WW3D2/Backend/DX8Backend.h
- Core/Libraries/Source/WWVegas/WW3D2/ww3d.h
- Core/Libraries/Source/WWVegas/WW3D2/IRenderBackend.h
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review.
bf420f9 to
edff1c0
Compare
c7a937b to
aa83f29
Compare
aa83f29 to
5f88f96
Compare
8536d91 to
a4e76a9
Compare
b127fb8 to
4fc01fd
Compare
4fc01fd to
afd3801
Compare
…_cast in BaseFunctions.h
afd3801 to
2159441
Compare
[Medium impact] The PR appears safe to merge, with the previous finding fixed and no new actionable issues found.
|
stephanmeesters
left a comment
There was a problem hiding this comment.
Looks correct to me. Dx8backend mixes use of unsigned and unsigned int
CryoTheRenegade
left a comment
There was a problem hiding this comment.
Looks correct otherwise. Two small points inline.
| inline T check_cast(U value) | ||
| { | ||
| const T result = static_cast<T>(value); | ||
| DEBUG_ASSERTCRASH(static_cast<U>(result) == value, ("check_cast changed the value")); |
There was a problem hiding this comment.
Since this is now a general helper, it could also catch sign changes. check_cast<unsigned int>(-1) round-trips and passes. Something like this works without <type_traits>:
DEBUG_ASSERTCRASH(static_cast<U>(result) == value && (result < T()) == (value < U()), ("check_cast changed the value"));| unsigned short min_vertex_index, unsigned short vertex_count); | ||
| static void Draw_Strip(unsigned short start_index, unsigned short polygon_count, | ||
| unsigned short min_vertex_index, unsigned short vertex_count); | ||
| static void Draw_Triangles(unsigned buffer_type, unsigned int start_index, unsigned int polygon_count, |
There was a problem hiding this comment.
This line is already changing, so unsigned buffer_type could become unsigned int buffer_type as well.
|
|
||
| void Renderer::Draw_Triangles(unsigned buffer_type, unsigned short start_index, unsigned short polygon_count, | ||
| unsigned short min_vertex_index, unsigned short vertex_count) | ||
| void Renderer::Draw_Triangles(unsigned buffer_type, unsigned int start_index, unsigned int polygon_count, |
There was a problem hiding this comment.
Same here: unsigned int buffer_type.
…pe as unsigned int
Draw_Triangles,Draw_StripandSet_Index_BufferonRenderertake 16-bit start index, counts, vertex range and index base offset, because that is what theDX8Wrappersignatures take.Now the interface takes 32-bit values.
DX8Backend.cppnarrows them to 16 bits and asserts that nothing was lost. Release builds narrow exactly as before. Debug builds now assert where a caller passes a value above 65535, which the old implicit conversion truncated silently.Zero Hour save at 60 seconds on top, Generals shell map below. Before on the left, after on the right.
Todo: