Skip to content

Conversation

@xezon
Copy link

@xezon xezon commented Dec 14, 2025

This change contains commits of #1989

This change has 3 commits:

The first commit fixes include paths in Height Map related files, which is required when moving files to Core. The second commit merges all the various Height Map code and moves several Zero Hour specific source files to Core. The third commit moves all Height Map and Terrain related files to Core.

Zero Hour fixes

One minor Zero Hour specific mistake was identified in TerrainTextureClass::update, where a IDirect3DSurface8 was not released on a fail path.

Generals changes

Generals get's a lot of changes. Most notably a huge refactor in HeightMap and WorldHeightMap, which was split into more files and classes: BaseHeightMap and FlatHeightMap.

It also gets most of the code for DO_SEISMIC_SIMULATIONS, except in BunkerBusterBehavior. It is compiled out and therefore does nothing. In Zero Hour code I dialed back a bit of the excessive empty whitespace that it had added.

It also gets all the changes for W3DPropBuffer and W3DTreeBuffer, which are owned by BaseHeightMap. They are practically unused because nothing gets added to them yet.

W3DRoadBuffer was not fully merged yet, just partially merged to make it compile.

WW3D2's shader and dx8caps, among many other files, only got the changes necessary to make it compile and run.

@xezon xezon added Major Severity: Minor < Major < Critical < Blocker Gen Relates to Generals ZH Relates to Zero Hour Unify Unifies code between Generals and Zero Hour labels Dec 14, 2025
@xezon xezon force-pushed the xezon/unify-heightmap-5 branch 2 times, most recently from ea69bc6 to 64b9f3c Compare December 14, 2025 16:13
@xezon
Copy link
Author

xezon commented Dec 14, 2025

Ran against 2 Generals Replays. Worked.

Copy link

@Skyaero42 Skyaero42 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could not detect any issues

Also ran several replays, no mismatches.

@xezon xezon force-pushed the xezon/unify-heightmap-5 branch from 64b9f3c to 8726aee Compare December 15, 2025 21:15
@xezon
Copy link
Author

xezon commented Dec 15, 2025

The first 2 commits compile on their own too.

@xezon xezon merged commit ce4e595 into TheSuperHackers:main Dec 15, 2025
23 checks passed
xezon added a commit that referenced this pull request Dec 15, 2025
…BaseHeightMap, FlatHeightMap, W3DPropDraw, W3DTreeDraw, W3DPropBuffer, W3DSnow, W3DTerrainBackground files to Core (#1991)
@xezon xezon deleted the xezon/unify-heightmap-5 branch December 15, 2025 21:40
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Gen Relates to Generals Major Severity: Minor < Major < Critical < Blocker Unify Unifies code between Generals and Zero Hour ZH Relates to Zero Hour

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants