reimplement: SHC_3BB0A8C1_0x0044B840 84% and SHC_3BB0A8C1_0x0044AAB0 100%#148
Draft
TheRedDaemon wants to merge 6 commits into
Draft
reimplement: SHC_3BB0A8C1_0x0044B840 84% and SHC_3BB0A8C1_0x0044AAB0 100%#148TheRedDaemon wants to merge 6 commits into
TheRedDaemon wants to merge 6 commits into
Conversation
Contributor
|
@TheRedDaemon Like so? // GLOBAL: STRONGHOLDCRUSADER 0x00B95B40
-// StructResolver::Instance<int[9],12147520>::instance
+// StructResolver::Instance<int [9],12147520>::instanceI tried to test but can't decide if this is wrong code or wrong comment notation by me
// GLOBAL: STRONGHOLDCRUSADER 0x00B98630
// StructResolver::Instance<int [10],12158512>::instance
namespace OpenSHC {
MACRO_STRUCT_RESOLVER(int[10], false, Address::SHC_3BB0A8C1_0x00B98630) DAT_CurrentPlayerUnitLossesHistory;
} // namespace OpenSHC
MACRO_STRUCT_INSTANCE(Address::SHC_3BB0A8C1_0x00B98630); |
Contributor
|
See fcc95ee |
TheRedDaemon
force-pushed
the
reimpl/SHC_3BB0A8C1_0x0044B840
branch
from
July 14, 2026 18:49
f60d04e to
fe6e4b6
Compare
TheRedDaemon
force-pushed
the
reimpl/SHC_3BB0A8C1_0x0044B840
branch
from
July 18, 2026 21:11
fe6e4b6 to
574eaa2
Compare
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.

Not much fun with this one.
The code has a lot of freedom due to a lot of math.
Worse (?) though is an issue with reccmp: There are array accesses that reccmp does not understand, it seems, which match only if I produce the original address, others however want the reimplementation to match. This makes trying to reason about the parts that seem to fit and those that do not hard.
I send a message to their discord.
I would halt this for now, since it is in no state to be merged. I think there is still a lot to try, but I spend a good amount of time trying and failing to match another function completely recently and in this other case reccmp was behaving at least.
We should return later in the hope the tool can improve, unless someone wants a challenge.
@gynt: I received help from the reccmp dev. The issue is the space between the type and the array brackets. The pdb data has a space there, so our annotations need to replicated this:
int[...]->int [...]EDIT: As expected, something still messes with the registers. Lost all patience on the other bigger functions.
Checked the logic, asked the AI, it is really just register choice for the most part and this thing has plenty of freedom.
There is also stuff like "DAT_DestroyedBuildingsCountHistory" and "DAT_DestroyedBuildingsCount", which could also be placed in a way that might suggest one array of 5, but replacing the type with this did not yield better results.
@gynt unless you want to try something, I would call it for this function.
Still needs the helper function adjustments, though.