unify(common-rts): Move Common/RTS to Core - #3048
Conversation
|
ResourceGatheringManager.cpp needs to have a merge first (separate commit) before being merged. |
|
How about merge all the Common/RTS files first, then move them all? |
I will revise this PR when I have the opportunity. |
edebd96 to
7407abb
Compare
7407abb to
7bdb298
Compare
I’ve rebuilt this PR, and for now there’s only one commit. The first commit simply merges the files so that Generals and Zero Hour use the same code. What I’m unsure about is whether I’ve implemented the CRC gating correctly, or if I’m even heading in the right direction with it. (I doubt it) I’ve also put comments and dead code behind CRC gates to at least distinguish which source they came from. That should make a later cleanup easier, although I know that cleanup is out of scope for this PR. I’ll do the actual unification commit and update the PR body once I get some direction on whether I’m heading in the right direction. |
| /// Build a building near a supply dump with at least cash. Gets passed to aiPlayer. | ||
| void buildBySupplies(Int minimumCash, const AsciiString &thingName); | ||
|
|
||
| #if RTS_ZEROHOUR |
There was a problem hiding this comment.
Definitely the wrong direction. Look at existing use cases of RTS_GENERALS and RTS_ZEROHOUR to understand when they are used.
Merging Zero Hour to Generals mostly needs considerations for INI/game data compatibility and CRC/Xfer compatibility. Maybe it helps to look at previous merges that did touch such areas. It is easy to make mistakes. I don't know whether LLM will make it slop. We did it by hand so far.
There was a problem hiding this comment.
I may just stick to the easy files for now, because I'm not really confident in my ability to not get this wrong.
This moves the remaining shared low-risk Common RTS files into Core:
The moved files are code-identical between both games except for the product-name license banner. ResourceGatheringManager.cpp also corrects a comment spelling.
Verification