Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
569 commits
Select commit Hold shift + click to select a range
352056f
reimplement: SHC_3BB0A8C1_0x0051B710 25.40% Style pass, asm differs
gynt Oct 17, 2026
844a9ba
reimplement: SHC_3BB0A8C1_0x00518930 68.00% Style pass, asm differs
gynt Oct 17, 2026
a716957
reimplement: SHC_3BB0A8C1_0x00518870 95.74% Style pass, asm differs
gynt Oct 17, 2026
5affbfe
reimplement: SHC_3BB0A8C1_0x0051D7F0 37.78% Unreachable 1010 arm rest…
gynt Oct 17, 2026
4c56f85
reimplement: SHC_3BB0A8C1_0x0051C570 27.11% Style pass, asm differs
gynt Oct 17, 2026
ab6ca60
[DOCS]: read placement is the strongest remaining lever
gynt Oct 17, 2026
2eca411
reimplement: SHC_3BB0A8C1_0x0051BA30 68.31% Style pass, asm differs
gynt Oct 17, 2026
c7cbbaa
[TOOLS]: move_read.py generates read-placement variants
gynt Oct 17, 2026
4657070
[TOOLS]: move_read.py must not move a statement out of its block
gynt Oct 17, 2026
6510c7c
reimplement: SHC_3BB0A8C1_0x0051C800 77.63% Style pass, asm differs
gynt Oct 17, 2026
6af3593
reimplement: SHC_3BB0A8C1_0x0051FB90 73.28% Style pass, asm differs
gynt Oct 17, 2026
6281aa0
reimplement: SHC_3BB0A8C1_0x0051ACE0 95.40% Style pass, asm differs
gynt Oct 17, 2026
1163f3f
reimplement: SHC_3BB0A8C1_0x00520450 78.41% Style pass, asm differs
gynt Oct 17, 2026
360902c
[TOOLS]: move_read.py needs three more guards
gynt Oct 17, 2026
6f44c51
reimplement: SHC_3BB0A8C1_0x0051F950 100.00% Reimplemented
gynt Oct 17, 2026
866f8ab
reimplement: SHC_3BB0A8C1_0x0051FE80 100.00% Reimplemented
gynt Oct 17, 2026
c8d282a
reimplement: SHC_3BB0A8C1_0x0051AF20 76.60% Fixed my off-by-one bound
gynt Oct 17, 2026
133f187
reimplement: SHC_3BB0A8C1_0x0051B240 76.60% Fixed my off-by-one bound
gynt Oct 17, 2026
72274e8
reimplement: SHC_3BB0A8C1_0x0051B0C0 76.60% Fixed my off-by-one bound
gynt Oct 17, 2026
1ba50b7
reimplement: SHC_3BB0A8C1_0x0051D690 100.00% Reimplemented
gynt Oct 17, 2026
abd2f82
reimplement: SHC_3BB0A8C1_0x0051A920 100.00% Reimplemented
gynt Oct 17, 2026
553f8c9
reimplement: SHC_3BB0A8C1_0x00520CD0 89.67% Dropped return restored, …
gynt Oct 17, 2026
98b368a
reimplement: SHC_3BB0A8C1_0x0051CF90 100.00% Reimplemented
gynt Oct 17, 2026
2073fa3
reimplement: SHC_3BB0A8C1_0x0051C360 96.36% Style pass, asm differs
gynt Oct 17, 2026
8982d5e
reimplement: SHC_3BB0A8C1_0x0051B6C0 100.00% Reimplemented
gynt Oct 17, 2026
6773863
reimplement: SHC_3BB0A8C1_0x0051DA70 46.90% Switch arms in original l…
gynt Oct 17, 2026
5b15311
reimplement: SHC_3BB0A8C1_0x00518930 72.00% Break test written as the…
gynt Oct 17, 2026
ef270ea
reimplement: SHC_3BB0A8C1_0x00519790 93.70% Dropped return restored
gynt Oct 17, 2026
3cf59b6
reimplement: SHC_3BB0A8C1_0x0051D2B0 98.90% Dropped returns restored
gynt Oct 17, 2026
b9c03e4
reimplement: SHC_3BB0A8C1_0x0051C500 89.20% Guard clauses, norm
gynt Oct 17, 2026
6704629
reimplement: SHC_3BB0A8C1_0x0051BF70 55.70% Cold case guarded first
gynt Oct 17, 2026
63bda2b
reimplement: SHC_3BB0A8C1_0x005182A0 97.70% Failure block ahead of th…
gynt Oct 17, 2026
6634d41
reimplement: SHC_3BB0A8C1_0x0051B2B0 73.70% Guard clauses, norm
gynt Oct 17, 2026
6a9ec07
reimplement: SHC_3BB0A8C1_0x00519990 47.40% Parameter no longer doubl…
gynt Oct 17, 2026
7075d83
reimplement: SHC_3BB0A8C1_0x00519990 52.20% Failure stores duplicated…
gynt Oct 17, 2026
7892a81
reimplement: SHC_3BB0A8C1_0x0051B710 25.90% Hoisted reads and a copy …
gynt Oct 17, 2026
abe28f1
reimplement: SHC_3BB0A8C1_0x0051DA70 47.30% Signpost array read throu…
gynt Oct 17, 2026
d420452
reimplement: SHC_3BB0A8C1_0x00519310 54.40% Dead default store dropped
gynt Oct 17, 2026
345e7d1
reimplement: SHC_3BB0A8C1_0x0051CCB0 52.50% Split knight counter merged
gynt Oct 17, 2026
33b5d35
reimplement: SHC_3BB0A8C1_0x005205A0 87.70% Dropped returns and an ea…
gynt Oct 17, 2026
154b0fb
reimplement: SHC_3BB0A8C1_0x0051D730 100.00% Reimplemented
gynt Oct 17, 2026
4372db6
reimplement: SHC_3BB0A8C1_0x00518800 87.50% Single epilogue
gynt Oct 17, 2026
9a7e07b
reimplement: SHC_3BB0A8C1_0x0051AE70 100.00% Reimplemented
gynt Oct 17, 2026
7218c30
reimplement: SHC_3BB0A8C1_0x0051C100 52.10% Pointer temp replaced by …
gynt Oct 17, 2026
3071e9d
reimplement: SHC_3BB0A8C1_0x0051D650 57.40% Pointer temp replaced by …
gynt Oct 17, 2026
df54f79
docs: loop shape is not reachable from the source
gynt Oct 17, 2026
582141e
reimplement: SHC_3BB0A8C1_0x005182A0 100.00% Reimplemented
gynt Oct 17, 2026
59bcfa0
reimplement: tribe scan loop bounds corrected (3 functions)
gynt Oct 17, 2026
0f73c9d
reimplement: SHC_3BB0A8C1_0x00519990 53.10% Cost bands as signed incl…
gynt Oct 17, 2026
ca6a6b9
reimplement: comparisons written in the original's encoding (6 functi…
gynt Oct 17, 2026
ce216e1
reimplement: SHC_3BB0A8C1_0x0051C570 32.80% Compound guard split into…
gynt Oct 17, 2026
4ebb3e2
reimplement: SHC_3BB0A8C1_0x0051BA30 70.20% Index on the left of the …
gynt Oct 17, 2026
2e17c29
reimplement: comparison operand order (2 functions)
gynt Oct 17, 2026
4373157
reimplement: two more comparison encodings
gynt Oct 17, 2026
e60b8a2
reimplement: SHC_3BB0A8C1_0x0051CA50 75.90% Branch arms in the origin…
gynt Oct 17, 2026
8cde4c9
reimplement: branch sense matched to the original (2 functions)
gynt Oct 17, 2026
2d405c1
reimplement: arms laid out in the original's order (3 functions)
gynt Oct 17, 2026
bfb8c50
reimplement: four more arms in the original's order
gynt Oct 17, 2026
fb55b84
reimplement: SHC_3BB0A8C1_0x0051D8C0 27.90% Building arm laid out first
gynt Oct 17, 2026
74c819f
reimplement: SHC_3BB0A8C1_0x0051C570 33.00% Second and third guards s…
gynt Oct 17, 2026
093cc7e
reimplement: SHC_3BB0A8C1_0x0051DA70 48.30% Keep types tested as sepa…
gynt Oct 17, 2026
42a037e
reimplement: SHC_3BB0A8C1_0x0051A4B0 94.90% Unit index held as an int
gynt Oct 17, 2026
d8d5c7f
reimplement: narrow locals widened to int (2 functions)
gynt Oct 17, 2026
4388641
reimplement: SHC_3BB0A8C1_0x0051B5B0 100.00% Reimplemented
gynt Oct 17, 2026
baa1cb7
reimplement: SHC_3BB0A8C1_0x0051BE60 100.00% Reimplemented
gynt Oct 17, 2026
17544e4
reimplement: repeated short casts and a pointer temp removed
gynt Oct 17, 2026
649c202
docs: repeated short casts cost a redundant conversion
gynt Oct 17, 2026
557ab50
reimplement: SHC_3BB0A8C1_0x0051E300 30.20% Gate/town/high2/arch2 blo…
gynt Oct 17, 2026
27ab88e
reimplement: SHC_3BB0A8C1_0x0051E300 30.40% Area scan widened and its…
gynt Oct 17, 2026
4c63d14
tools: swap_arms.py, and the per-block method for long functions
gynt Oct 17, 2026
16f5bd2
reimplement: SHC_3BB0A8C1_0x0051A560 100.00% Reimplemented
gynt Oct 17, 2026
f9279d3
reimplement: SHC_3BB0A8C1_0x0051B3F0 88.60% Unit index split out; sig…
gynt Oct 17, 2026
448b017
reimplement: SHC_3BB0A8C1_0x005200A0 87.60% Zone flag normalised to 0/1
gynt Oct 17, 2026
6702e0f
reimplement: SHC_3BB0A8C1_0x00518150 81.00% Dropped return restored -…
gynt Oct 17, 2026
e83daae
reimplement: SHC_3BB0A8C1_0x0051D2B0 100.00% Reimplemented
gynt Oct 17, 2026
c67460e
reimplement: SHC_3BB0A8C1_0x0051C500 100.00% Reimplemented
gynt Oct 17, 2026
8a890a6
reimplement: SHC_3BB0A8C1_0x0051A4B0 100.00% Reimplemented
gynt Oct 17, 2026
ba2f20f
reimplement: SHC_3BB0A8C1_0x00518710 96.80% Range test as two separat…
gynt Oct 17, 2026
e040205
reimplement: SHC_3BB0A8C1_0x00518C50 82.40% Second column derived fro…
gynt Oct 17, 2026
d94f505
reimplement: SHC_3BB0A8C1_0x005205A0 88.10% Scale-tribe bounds as the…
gynt Oct 17, 2026
145cd11
reimplement: SHC_3BB0A8C1_0x0051A0D0 41.70% Height tests signed, with…
gynt Oct 17, 2026
8702bb5
reimplement: SHC_3BB0A8C1_0x0051B420 83.20% Logic-layer guard split out
gynt Oct 17, 2026
322f701
reimplement: SHC_3BB0A8C1_0x0051B710 26.80% Engineer build queue cove…
gynt Oct 17, 2026
4e9614d
reimplement: SHC_3BB0A8C1_0x0051D650 88.10% attackInfo reached throug…
gynt Oct 17, 2026
24853ec
docs: retry failed changes after structural wins; literal vs symbolic…
gynt Oct 17, 2026
c210338
reimplement: SHC_3BB0A8C1_0x0051DA70 55.10% Arm order corrected - the…
gynt Oct 17, 2026
0667717
reimplement: SHC_3BB0A8C1_0x0051DA70 55.00% Arms return; restores a b…
gynt Oct 17, 2026
75b961f
reimplement: SHC_3BB0A8C1_0x0051DA70 54.80% 0x412 no longer claims an…
gynt Oct 17, 2026
1de6fae
reimplement: SHC_3BB0A8C1_0x0051C570 34.20% Troop-count bound as the …
gynt Oct 17, 2026
093035e
reimplement: three more comparison encodings
gynt Oct 17, 2026
17c66f1
reimplement: unit index split out; budget comparison flipped
gynt Oct 17, 2026
e9bf86d
reimplement: SHC_3BB0A8C1_0x005209A0 90.90% Tribe-count bound as '0xa…
gynt Oct 17, 2026
9003b00
tools: arm_layout.py, arm_sizes.py, sweep_all.py and four more patterns
gynt Oct 17, 2026
cf941c0
docs: /GL and register reuse are both dead ends for the allocator-bou…
gynt Oct 17, 2026
ae9e78a
reimplement: SHC_3BB0A8C1_0x0051B710 32.60% Queue cap off by one; sco…
gynt Oct 17, 2026
37b5398
reimplement: SHC_3BB0A8C1_0x0051B710 32.60% maxUnitCount read into th…
gynt Oct 17, 2026
bf63f2e
reimplement: SHC_3BB0A8C1_0x0051C570 36.50% getValueOfTroopType calle…
gynt Oct 17, 2026
8e7c6e2
reimplement: SHC_3BB0A8C1_0x0051F5C0 41.70% Tent-point score threshol…
gynt Oct 17, 2026
9dc5bb8
reimplement: SHC_3BB0A8C1_0x0051F9C0 60.20% getValueOfTroopType calle…
gynt Oct 17, 2026
662ec30
reimplement: SHC_3BB0A8C1_0x0051CCB0 54.00% Knight-limit threshold of…
gynt Oct 17, 2026
d939b39
reimplement: three slot scans 76.60% -> 100.00% the spare local was t…
gynt Oct 17, 2026
28e9c8f
reimplement: pruneStale trio 70.70% -> 77.10% int-cast the loop bound
gynt Oct 17, 2026
e4b66c3
reimplement: applyTribeBehaviorTypes 95.70% -> 100.00% initialise the…
gynt Oct 17, 2026
ccb6353
reimplement: SHC_3BB0A8C1_0x0051B570 88.60% -> 100.00% read the cache…
gynt Oct 17, 2026
e077286
reimplement: SHC_3BB0A8C1_0x0051D020 62.10% -> 100.00% read the cache…
gynt Oct 17, 2026
ba1502f
docs: record the sweep false-positive pattern and four measured reverts
gynt Oct 17, 2026
1f26517
reimplement: SHC_3BB0A8C1_0x005200A0 87.60% -> 89.20% branch the bool…
gynt Oct 17, 2026
c06cf14
reimplement: SHC_3BB0A8C1_0x00518C50 82.40% -> 95.80% rebase column o…
gynt Oct 17, 2026
a02ccfc
reimplement: three functions via the cached-local substitution
gynt Oct 17, 2026
db1b111
docs: three more measured negative results
gynt Oct 17, 2026
0fa848b
docs: prioritise by starting percentage - local fixes only pay above …
gynt Oct 17, 2026
fce32b2
docs: the induction-pointer anchor is not source-controllable
gynt Oct 17, 2026
88effd9
reimplement: SHC_3BB0A8C1_0x0051E300 30.50% -> 31.00% setge encoding …
gynt Oct 18, 2026
fd4c8b6
docs: what the Ghidra reading establishes about the low-scoring funct…
gynt Oct 18, 2026
5cef493
reimplement: SHC_3BB0A8C1_0x0051B710 32.60% -> 44.10% drop a redundan…
gynt Oct 18, 2026
c6b5c72
reimplement: SHC_3BB0A8C1_0x00519990 63.20% -> 66.40% mask expression…
gynt Oct 18, 2026
8e400f1
reimplement: SHC_3BB0A8C1_0x0051BA30 70.20% -> 75.70% hoist a loop-in…
gynt Oct 18, 2026
2f07dde
docs: the instruction-surplus ranking, the technique that works below…
gynt Oct 18, 2026
623d360
docs: the updateTribeBehavior stack slot is removable and not worth it
gynt Oct 18, 2026
5aa841d
reimplement: SHC_3BB0A8C1_0x0051C570 36.50% -> 37.80% switch arm orde…
gynt Oct 18, 2026
dac5164
docs: decoding jump tables with ghidra-mcp, the one reliable structur…
gynt Oct 18, 2026
01625da
style: no gotos and the style guide across the branch, 91.07% -> 91.1…
gynt Oct 18, 2026
55fb07b
replace silly #include "../../../Map.func.hpp"
gynt Oct 18, 2026
2012a67
Use #include "../TroopValueState.func.hpp"
gynt Oct 18, 2026
e10d5bc
style: declare TroopValueState locals at first use, measured neutral …
gynt Oct 18, 2026
48f2a91
reimplement: SHC_3BB0A8C1_0x005205A0 91.47% frame size now matches
gynt Oct 23, 2026
f18e6f1
reimplement: SHC_3BB0A8C1_0x00519850 100.00% Reimplemented
gynt Oct 23, 2026
efb026e
reimplement: SHC_3BB0A8C1_0x0051D7F0 74.36% cmp operand order
gynt Oct 23, 2026
06cc25c
reimplement: SHC_3BB0A8C1_0x0051E300 41.02% asm macro, 5 exact blocks
gynt Oct 23, 2026
52408b2
reimplement: SHC_3BB0A8C1_0x0051E300 42.55% asm macros, 6 exact blocks
gynt Oct 23, 2026
f30b392
refactor: derive the TroopValueState asm operands from the resolver a…
gynt Oct 23, 2026
41f5b19
Adopt the five Wilps implementations that measure better here (#17)
gynt Nov 2, 2026
528bcdd
Merge upstream/main into reimpl/TroopValueState
gynt Nov 25, 2026
4f9ed4f
fix(TroopValueState): follow main's renames after the merge
gynt Nov 25, 2026
fba4861
style(TroopValueState): mechanical style-guide pass
gynt Nov 25, 2026
4d71d58
style(TroopValueState): readability pass on the functions at 100%
gynt Nov 25, 2026
56600a6
style(TroopValueState): named colours and strings in the debug overlay
gynt Nov 25, 2026
127b6f8
fix: restore the TroopValueState.func.hpp include outside its folder
gynt Nov 25, 2026
6174c67
headers: BOOLEnum for three AttackInfo flags and seven flag parameters
gynt Nov 25, 2026
cf40a52
style(TroopValueState): BOOLEnum flags tested and stored as such
gynt Nov 25, 2026
bbae3a3
Merge remote-tracking branch 'upstream/main' into reimpl/TroopValueState
gynt Nov 26, 2026
d6c1b00
headers: signed byte layers and tile returns, siege tribe types
gynt Nov 25, 2026
d44078a
style(TroopValueState): drop casts, name map constants, remove comments
gynt Nov 26, 2026
8369105
fix(TroopValueState): index nof_tribes directly now that it is char
gynt Nov 26, 2026
5c237ad
Merge remote-tracking branch 'upstream/main' into reimpl/TroopValueState
gynt Nov 26, 2026
767cb39
headers: int tile returns and parameters, attack wave state enum, arc…
gynt Nov 26, 2026
172dd28
style(TroopValueState): int coordinates and tiles, archer points by f…
gynt Nov 26, 2026
5de1174
headers: AttackInfo tent points span 2001 entries
gynt Nov 26, 2026
f9f11d7
style(TroopValueState): bound the point slot searches by their arrays
gynt Nov 26, 2026
1a79388
fix(TroopValueState): follow the AttackInfo, wave state and archer po…
gynt Nov 26, 2026
b80bb4a
style(TroopValueState): bound the stale point prunes by their arrays
gynt Nov 26, 2026
f6148d7
headers: AttackInfo lord and people points span 1001 entries
gynt Nov 26, 2026
1147416
fix(TroopValueState): computeSiegeSpotScores scores the wide points o…
gynt Nov 26, 2026
1364610
Merge remote-tracking branch 'upstream/main' into reimpl/TroopValueState
gynt Nov 27, 2026
1073005
style(TroopValueState): wave state local follows value3Array01's Atta…
gynt Nov 27, 2026
5eb975e
Merge remote-tracking branch 'upstream/main' into reimpl/TroopValueState
gynt Nov 27, 2026
c43bb71
reimplement: SHC_3BB0A8C1_0x005200A0 100.0% Reimplemented
gynt Nov 28, 2026
f3ce790
reimplement: SHC_3BB0A8C1_0x0051A220 100.0% Reimplemented
gynt Nov 28, 2026
7e11cd2
reimplement: SHC_3BB0A8C1_0x0051C360 100.0% Reimplemented
gynt Nov 28, 2026
0a7691b
reimplement: SHC_3BB0A8C1_0x00519790 100.0% Reimplemented
gynt Nov 28, 2026
c4e6ec2
reimplement: SHC_3BB0A8C1_0x0051AF70 80.49% Known-zero push lost in loop
gynt Nov 28, 2026
b8fdf3c
reimplement: SHC_3BB0A8C1_0x0051FB90 79.44% Const 1 register allocation
gynt Nov 28, 2026
2bf7043
reimplement: SHC_3BB0A8C1_0x0051F340 82.65% Early exit skips prev store
gynt Nov 28, 2026
2fbe7f8
reimplement: SHC_3BB0A8C1_0x00518930 72.0% param_3 not enregistered
gynt Nov 28, 2026
4aa6d26
reimplement: SHC_3BB0A8C1_0x00520CD0 100.0% Reimplemented
gynt Nov 28, 2026
a7f2876
reimplement: SHC_3BB0A8C1_0x0051CA50 100.0% Reimplemented
gynt Nov 28, 2026
ef117b7
reimplement: SHC_3BB0A8C1_0x0051F9C0 100.0% Reimplemented
gynt Nov 28, 2026
bd8b400
reimplement: SHC_3BB0A8C1_0x0051C570 94.97% Zero sums share the index…
gynt Nov 28, 2026
9376920
fix(TroopValueState): executeAttackWaveTargetAssignment returns after…
gynt Nov 28, 2026
f5d82b3
tools(reg_scores): --whyreg prints each pick's key, weight and id
gynt Nov 28, 2026
1e829f9
Merge origin/main into reimpl/TroopValueState
gynt Dec 2, 2026
f46ec22
TroopValueState: adapt to main's renamed AttackInfo and PlayerData fi…
gynt Dec 2, 2026
c8d467a
Apply clang-format to PR sources
gynt Dec 2, 2026
b3de72e
Merge origin/main into reimpl/TroopValueState
gynt Dec 3, 2026
2217098
types: siege tent tables as globals of their own (from reimpl/TroopVa…
gynt Dec 3, 2026
4bb276f
readVolumeFileAndSetupSoundVolumes: back to main's version
gynt Dec 3, 2026
048caf9
cmake: /GL for assignMacemenAndKnightsNotFromPlayer1ToTribes, placeSi…
gynt Dec 3, 2026
a3844d9
reimplement: SHC_3BB0A8C1_0x0051D680 100.00% Reimplemented
gynt Dec 3, 2026
06c9e58
reimplement: SHC_3BB0A8C1_0x0051D690 100.00% Reimplemented
gynt Dec 3, 2026
6a36fad
reimplement: SHC_3BB0A8C1_0x00520F70 100.00% Reimplemented
gynt Dec 3, 2026
6b08941
reimplement: SHC_3BB0A8C1_0x005202B0 100.00% Reimplemented
gynt Dec 3, 2026
fb40ee4
reimplement: SHC_3BB0A8C1_0x005200A0 100.00% Reimplemented
gynt Dec 3, 2026
78dafb9
reimplement: SHC_3BB0A8C1_0x0051CCB0 87.32% register naming, tribe mu…
gynt Dec 3, 2026
3be5142
reimplement: SHC_3BB0A8C1_0x0051ACB0 100.00% Reimplemented
gynt Dec 3, 2026
784b93c
reimplement: SHC_3BB0A8C1_0x0051AC80 100.00% Reimplemented
gynt Dec 3, 2026
ff47d0b
reimplement: SHC_3BB0A8C1_0x0051AFF0 100.00% Reimplemented
gynt Dec 3, 2026
e700e2f
reimplement: SHC_3BB0A8C1_0x0051B680 100.00% Reimplemented
gynt Dec 3, 2026
674081e
reimplement: SHC_3BB0A8C1_0x0051CA50 100.00% Reimplemented
gynt Dec 3, 2026
564c5ea
reimplement: SHC_3BB0A8C1_0x00520CD0 100.00% Reimplemented
gynt Dec 3, 2026
4cff475
reimplement: SHC_3BB0A8C1_0x0051ACE0 95.40% eax vs ecx for row index lea
gynt Dec 3, 2026
4c2ee02
reimplement: SHC_3BB0A8C1_0x0051AE00 95.56% eax vs ecx for row index lea
gynt Dec 3, 2026
9825111
reimplement: SHC_3BB0A8C1_0x0051AE90 95.56% eax vs ecx for row index lea
gynt Dec 3, 2026
3841869
reimplement: SHC_3BB0A8C1_0x0051A220 100.00% Reimplemented
gynt Dec 3, 2026
e10527d
reimplement: SHC_3BB0A8C1_0x00519CC0 100.00% Reimplemented
gynt Dec 3, 2026
c605c07
reimplement: SHC_3BB0A8C1_0x0051A8A0 100.00% Reimplemented
gynt Dec 3, 2026
aeafe76
reimplement: SHC_3BB0A8C1_0x0051AF20 100.00% Reimplemented
gynt Dec 3, 2026
a9c9df2
reimplement: SHC_3BB0A8C1_0x00519960 100.00% Reimplemented
gynt Dec 3, 2026
44a0f8f
reimplement: SHC_3BB0A8C1_0x00519850 100.00% Reimplemented
gynt Dec 3, 2026
e747389
reimplement: SHC_3BB0A8C1_0x00518350 100.00% Reimplemented
gynt Dec 3, 2026
81d578e
reimplement: SHC_3BB0A8C1_0x0051D510 100.00% Reimplemented
gynt Dec 3, 2026
eefe762
reimplement: SHC_3BB0A8C1_0x0051D450 100.00% Reimplemented
gynt Dec 3, 2026
b06fb32
reimplement: SHC_3BB0A8C1_0x0051D1C0 100.00% Reimplemented
gynt Dec 3, 2026
82786ea
reimplement: SHC_3BB0A8C1_0x0051B710 97.40% prologue reg order; lea c…
gynt Dec 3, 2026
7b42f2f
reimplement: SHC_3BB0A8C1_0x0051F9C0 100.00% Reimplemented
gynt Dec 3, 2026
1e4da2a
reimplement: SHC_3BB0A8C1_0x0051BE60 100.00% Reimplemented
gynt Dec 3, 2026
09767c0
reimplement: SHC_3BB0A8C1_0x0051F4B0 100.00% Reimplemented
gynt Dec 3, 2026
acfee41
reimplement: SHC_3BB0A8C1_0x005182A0 100.00% Reimplemented
gynt Dec 3, 2026
72af809
reimplement: SHC_3BB0A8C1_0x00519790 100.00% Reimplemented
gynt Dec 3, 2026
2eb54b6
reimplement: SHC_3BB0A8C1_0x0051FB80 100.00% Reimplemented
gynt Dec 3, 2026
cfd8fe8
reimplement: SHC_3BB0A8C1_0x00522590 100.00% Reimplemented
gynt Dec 3, 2026
cb5703a
status: 14 TroopValueState functions measure 100%
gynt Dec 3, 2026
f36a866
reimplement: commandUnitsToMoveToKeep 88.70% esi anchor offset +8
gynt Dec 3, 2026
6e8aaf9
reimplement: SHC_3BB0A8C1_0x0051ACE0 100.00% Reimplemented
gynt Dec 3, 2026
60f7c19
reimplement: SHC_3BB0A8C1_0x0051AE00 100.00% Reimplemented
gynt Dec 3, 2026
dd8d6f1
reimplement: SHC_3BB0A8C1_0x0051AE90 100.00% Reimplemented
gynt Dec 3, 2026
4994336
reimplement: SHC_3BB0A8C1_0x00518180 96.88% zero-store order (scheduler)
gynt Dec 3, 2026
2fadd14
reimplement: SHC_3BB0A8C1_0x0051FF90 100.00% Reimplemented
gynt Dec 3, 2026
53c0bd7
reimplement: SHC_3BB0A8C1_0x00520450 100.00% Reimplemented
gynt Dec 3, 2026
121606b
build: compile three TroopValueState units with /GL
gynt Dec 3, 2026
0d8c449
reimplement: SHC_3BB0A8C1_0x0051CCB0 100.00% Reimplemented
gynt Dec 3, 2026
5a4fe6b
reimplement: SHC_3BB0A8C1_0x0051BF70 100.00% Reimplemented
gynt Dec 3, 2026
91e1291
reimplement: SHC_3BB0A8C1_0x0051B710 100.00% Reimplemented
gynt Dec 3, 2026
521a4c9
reimplement: SHC_3BB0A8C1_0x0051BA30 100.00% Reimplemented
gynt Dec 3, 2026
494dbef
reimplement: SHC_3BB0A8C1_0x0051F340 100.00% Reimplemented
gynt Dec 3, 2026
223c5a6
status: refresh the remaining sub-100 functions of the TroopValueStat…
gynt Dec 3, 2026
6a13283
reimplement: assignBehaviorTypeAndLinkSupportTribe 100.00% Reimplemented
gynt Dec 4, 2026
c248050
reimplement: SHC_3BB0A8C1_0x0051F5C0 42.49% startCon hoisted to ebx
gynt Dec 4, 2026
ce30fe5
status: assignBehaviorTypeToNearbyTribes blocker measured with reg_sc…
gynt Dec 4, 2026
3d5d96b
reimplement: SHC_3BB0A8C1_0x00519990 95.54% GL; base/index reg order
gynt Dec 4, 2026
85f383d
reimplement: SHC_3BB0A8C1_0x0051D7F0 97.47% counter load copy (ushort)
gynt Dec 4, 2026
b78ae7b
reimplement: SHC_3BB0A8C1_0x0051C800 100.00% Reimplemented
gynt Dec 4, 2026
c5c7646
reimplement: SHC_3BB0A8C1_0x0051BD10 100.00% Reimplemented
gynt Dec 4, 2026
0bae9b8
reimplement: SHC_3BB0A8C1_0x0051B420 88.42% early-exit wall, const 1 reg
gynt Dec 4, 2026
1ca1272
reimplement: SHC_3BB0A8C1_0x0051C570 100.00% Reimplemented
gynt Dec 4, 2026
4389e9a
reimplement: SHC_3BB0A8C1_0x00519990 96.43% GL; base/index reg order
gynt Dec 4, 2026
7834dc8
reimplement: SHC_3BB0A8C1_0x0051FB90 94.44% const 1 range start (esi)
gynt Dec 4, 2026
b14f98d
reimplement: SHC_3BB0A8C1_0x00518930 74.00% param tie: param_1 enregi…
gynt Dec 4, 2026
9a9da0f
reimplement: SHC_3BB0A8C1_0x0051FB90 96.67% const 1 range start (esi)
gynt Dec 4, 2026
2558534
reimplement: SHC_3BB0A8C1_0x0051F5C0 46.50% startCon enregistered in …
gynt Dec 4, 2026
4ae047f
reimplement: SHC_3BB0A8C1_0x0051E300 42.75% zero in ebx not edi
gynt Dec 4, 2026
a60b8f2
Merge upstream/main 06cdd8116 into reimpl/TroopValueState
gynt Dec 4, 2026
b548813
headers: add the TribeState enum (Map::Enums, TS_ prefix)
gynt Dec 4, 2026
a76c116
Adapt to main's AttackInfoDefinedData and SiegeSpotScore (0701799a9)
gynt Dec 4, 2026
168f022
Merge origin/main into reimpl/TroopValueState
gynt Dec 4, 2026
6a39245
Merge origin/main into reimpl/TroopValueState
gynt Dec 5, 2026
8a1c75a
TroopValueState: assignBehaviorTypeToNearbyTribes takes int offsets
gynt Dec 5, 2026
27a5297
TroopValueState: assignBehaviorTypeToNearbyTribes to 100%
gynt Dec 5, 2026
f3e1757
TroopValueState: restructure sortAttackInfoTribeIDArrayBasedOn
gynt Dec 5, 2026
fce8bed
TroopValueState: placeSiegeTentOrTunnelAtSuitableLocationAndAssignEng…
gynt Dec 5, 2026
714c43a
TroopValueState: executeAttackWaveTargetAssignment to 100%
gynt Dec 5, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
790 changes: 790 additions & 0 deletions AGENTS.md

Large diffs are not rendered by default.

13 changes: 13 additions & 0 deletions cmake/compiler-flags-gl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -450,6 +450,19 @@ src/OpenSHC/Map/Units/UpdateJester.cpp
src/OpenSHC/Map/Units/UpdateSlave.cpp
src/OpenSHC/Map/Units/UpdateHealer.cpp
src/OpenSHC/Map/Units/UpdateSpearman.cpp
src/OpenSHC/Map/Units/TroopValueState/collectArcherUnitsByLocation.cpp
src/OpenSHC/Map/Units/TroopValueState/getPlayerNot1AndHasKeep.cpp
src/OpenSHC/Map/Units/TroopValueState/getValueOfTroopType.cpp
src/OpenSHC/Map/Units/TroopValueState/recountTotalTroopValue.cpp
src/OpenSHC/Map/Units/TroopValueState/ifNecessaryThrowOilAutomatically.cpp
src/OpenSHC/Map/Units/TroopValueState/assignMacemenAndKnightsNotFromPlayer1ToTribes.cpp
src/OpenSHC/Map/Units/TribesState/addUnitToTribe.cpp
src/OpenSHC/Map/Units/TribesState/setWhetherTribeContainsAnyUnits.cpp
src/OpenSHC/Map/Units/TroopValueState/placeSiegeTentsAndAssignEngineers.cpp
src/OpenSHC/Map/Units/TroopValueState/scanForArcherPoints.cpp
src/OpenSHC/Map/Units/TroopValueState/placeTunnelForEveryTunneler.cpp
src/OpenSHC/Map/Units/TroopValueState/giveLightPitchInstructionToUnitClosestToPitch.cpp
src/OpenSHC/Map/Units/TroopValueState/computeSiegeSpotScores.cpp
src/OpenSHC/Map/Units/UpdateSlinger.cpp
src/OpenSHC/Map/Units/UpdateWoodcutter.cpp
src/OpenSHC/Map/Units/UpdateFletcher.cpp
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSHC/Audio/SFX/SFXState/playUnitSpeech.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ namespace Audio {
return;
}

int numberOfVariations = DAT_SpeechDefinedData::instance.UnitSpeech[actionID].numberOfVariations;
int const numberOfVariations = DAT_SpeechDefinedData::instance.UnitSpeech[actionID].numberOfVariations;
if (1 < numberOfVariations) {
/* Calculate action speech variation. */
variationIndex = DAT_SpeechDefinedData::instance.UnitSpeech[actionID].variationCounter[_soundSet]++;
Expand Down
9 changes: 5 additions & 4 deletions src/OpenSHC/Audio/mss/SoundSystem/playRandomAmbientMusic.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,7 @@ namespace Audio {
} else if (0
< DAT_GameState::instance.playerDataArray[DAT_GameSynchronyState::instance.currentPlayerSlotID]
.totalEnemyUnitsCount
&& DAT_TroopValueState::instance.attackInfo.lowTroopValueRelated == 0) {
&& !DAT_TroopValueState::instance.attackInfo.lowTroopValueRelated) {
MACRO_CALL_MEMBER(SoundSystem_Func::playRandomMusic02, this)(1);
MACRO_CALL_MEMBER(SoundSystem_Func::playBattleGloryMusicIfConditionsMet, this)();
}
Expand Down Expand Up @@ -260,12 +260,13 @@ namespace Audio {
&& 30000 < timeGetTime() - DAT_SoundEffectsHelperData1::instance.DAT_SomeSoundTime2) {
MACRO_CALL_MEMBER(Random::RNG_Func::nextRandomNumber1, SEC_RNG::ptr)();
int const randomNumber = SEC_RNG::instance.currentNumber1 % 3;
if (randomNumber == 0)
if (randomNumber == 0) {
DAT_SoundEffectsHelperData1::instance.battleMoodState = 1;
else if (randomNumber == 1)
} else if (randomNumber == 1) {
DAT_SoundEffectsHelperData1::instance.battleMoodState = 2;
else
} else {
DAT_SoundEffectsHelperData1::instance.battleMoodState = 0;
}
}
}

Expand Down
11 changes: 6 additions & 5 deletions src/OpenSHC/Global/WinMain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -172,8 +172,8 @@ int __stdcall Global::WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPST

// The original passes the AICState as this to the empty function
((void(__fastcall*)(OpenSHC::AI::AICState*))MACRO_CALL(OpenSHC::Global_Func::DoNothing))(DAT_AICState::ptr);
int mainMenuBorderHeight = DAT_WindowAndDirectDraw::instance.mainMenuBorderHeight;
int mainMenuBorderWidth = DAT_WindowAndDirectDraw::instance.mainMenuBorderWidth;
int const mainMenuBorderHeight = DAT_WindowAndDirectDraw::instance.mainMenuBorderHeight;
int const mainMenuBorderWidth = DAT_WindowAndDirectDraw::instance.mainMenuBorderWidth;
Menu* loadingMenu = DAT_MenuHandlerState::instance.currentMenu;
loadingMenu->yPosition = mainMenuBorderHeight;
loadingMenu->xPosition = mainMenuBorderWidth;
Expand Down Expand Up @@ -241,8 +241,9 @@ int __stdcall Global::WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPST
*/
tagMSG windowMessage;
if (PeekMessageA(&windowMessage, NULL, 0, 0, 0)) {
if (!GetMessageA(&windowMessage, NULL, 0, 0))
if (!GetMessageA(&windowMessage, NULL, 0, 0)) {
break; // Break the game loop
}
TranslateMessage(&windowMessage);
DispatchMessageA(&windowMessage);
} else {
Expand Down Expand Up @@ -442,15 +443,15 @@ int __stdcall Global::WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPST
&& MACRO_CALL_MEMBER(
OpenSHC::Game::GameCore_Func::getAreWeInAInGameMenu, DAT_GameCore::ptr)()) {
if (TIME_ReceivedMessage_2::instance) {
int pausedDuration = timeGetTime() - TIME_ReceivedMessage_2::instance;
int const pausedDuration = timeGetTime() - TIME_ReceivedMessage_2::instance;
TIME_ReceivedMessage_2::instance = 0;
DAT_GameCore::instance.timeSum_2 = DAT_GameCore::instance.timeSum_2 + pausedDuration;
}
} else if (!TIME_ReceivedMessage_2::instance) {
TIME_ReceivedMessage_2::instance = timeGetTime();
}
if (TIME_ReceivedMessage_1::instance) {
int unfocusedDuration = timeGetTime() - TIME_ReceivedMessage_1::instance;
int const unfocusedDuration = timeGetTime() - TIME_ReceivedMessage_1::instance;
TIME_ReceivedMessage_1::instance = 0;
TIME_Sum_1::instance = TIME_Sum_1::instance + unfocusedDuration;
}
Expand Down
2 changes: 1 addition & 1 deletion src/OpenSHC/IO/FilePackager/readMapOrSavFile.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ namespace IO {

char* _mapName
= MACRO_CALL_MEMBER(ResourceManager_Func::getFileNameOfCurrentActiveResource, DAT_ResourceManager::ptr)();
int _fileDescriptor = MACRO_CALL(OS_Func::_ucrt_open)(_mapName, _O_BINARY, 0);
int const _fileDescriptor = MACRO_CALL(OS_Func::_ucrt_open)(_mapName, _O_BINARY, 0);
if (_fileDescriptor == -1) {
MACRO_CALL(OS_Func::_free_base)(_previewOrDescriptionUnk);
MACRO_CALL(OS_Func::_free_base)(this->tempMem);
Expand Down
8 changes: 4 additions & 4 deletions src/OpenSHC/Input/MouseState/drawMouseBasedBox.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -20,10 +20,10 @@ namespace Input {
MACRO_CALL_MEMBER(MouseState_Func::resetMouseCursorState, this)();
return;
}
int left = this->previousSelectionBox.left;
int right = this->previousSelectionBox.right;
int top = this->previousSelectionBox.top;
int bottom = this->previousSelectionBox.bottom;
int const left = this->previousSelectionBox.left;
int const right = this->previousSelectionBox.right;
int const top = this->previousSelectionBox.top;
int const bottom = this->previousSelectionBox.bottom;

DAT_PencilRenderCore::instance.surfaceTarget = Rendering::Enums::RT_MAP_GAME;
MACRO_CALL_MEMBER(UI::Rendering::PencilRenderCore_Func::drawBorderBox, DAT_PencilRenderCore::ptr)(
Expand Down
30 changes: 30 additions & 0 deletions src/OpenSHC/Map/Units/TribesState/addUnitToTribe.cpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
#include "../TribesState.func.hpp"

#include "OpenSHC/Globals/DAT_UnitSelectionDefinedData.hpp"
#include "OpenSHC/Globals/DAT_UnitsState.hpp"

namespace OpenSHC {
namespace Map {
namespace Units {

// FUNCTION: STRONGHOLDCRUSADER 0x00522590
void TribesState::addUnitToTribe(uint unitID, int tribeID)
{
this->tribes[tribeID].size = this->tribes[tribeID].size + 1;
int const bitFlagsIndex = (int)unitID / 16;
int const bitMaskIndex = (int)unitID % 16;
this->tribes[tribeID].unitSelectionBitMasked[bitFlagsIndex]
|= DAT_UnitSelectionDefinedData::instance.BitMaskHelper[bitMaskIndex];
if (this->tribes[tribeID].selectionTargetUnitID == 0) {
this->tribes[tribeID].selectionTargetUnitID = unitID;
}
DAT_UnitsState::instance.units[unitID].selectionTargetUnitID = this->tribes[tribeID].selectionTargetUnitID;
DAT_UnitsState::instance.units[unitID].tribeID = tribeID;
DAT_UnitsState::instance.units[unitID].tribeUID = this->tribes[tribeID].uid;
DAT_UnitsState::instance.units[unitID].idInTribe = this->tribes[tribeID].size;
MACRO_CALL_MEMBER(TribesState_Func::setWhetherTribeContainsAnyUnits, this)(tribeID);
}

}
}
}
138 changes: 138 additions & 0 deletions src/OpenSHC/Map/Units/TroopValueState.asm.hpp
Original file line number Diff line number Diff line change
@@ -0,0 +1,138 @@
#pragma once

#include <cstddef>

#include "OpenSHC/Map/TileMapState.hpp"

/**
Hand-written assembly macros for OpenSHC::Map::Units::TroopValueState.

Only sequences that MSVC provably will not emit from C++ belong here. Every
macro reproduces one byte-identical run from the original binary; the C++
equivalent is kept as a comment above it so the behaviour stays readable.

A resolver global cannot be named inside an __asm operand (`::` is not
parseable there), and a base passed in as a pointer would assemble as
register-indirect addressing where the original uses absolute. So the
namespace below re-declares the resolver's own address as unqualified
enumerators, which the inline assembler accepts as compile-time constants.
The address comes from the project's address table and the field offsets from
the generated struct, so no literal is repeated here.

The `ds:` override is load bearing: a bracketed constant expression on its
own assembles as an immediate, which would load the field's address instead
of its value.
*/

namespace OpenSHC {
namespace Map {
namespace Units {

// The same address DAT_TileMapState.hpp hands to MACRO_STRUCT_RESOLVER,
// so with the struct resolvers enabled these are the original's own
// addresses. Unqualified on purpose: __asm cannot parse `::`.
enum {
ASM_TileMapState = Address::SHC_3BB0A8C1_0x01A93208,

ASM_TileMapState_DAT_SomeY = ASM_TileMapState + offsetof(TileMapState, DAT_SomeY),
ASM_TileMapState_DAT_SomeTile = ASM_TileMapState + offsetof(TileMapState, DAT_SomeTile),
ASM_TileMapState_ptr_MovementDirectionTranslationMatrix
= ASM_TileMapState + offsetof(TileMapState, ptr_MovementDirectionTranslationMatrix),
ASM_TileMapState_ptr_PathConnectionLayer
= ASM_TileMapState + offsetof(TileMapState, ptr_PathConnectionLayer),
ASM_TileMapState_ptr_SpecialAreasArray
= ASM_TileMapState + offsetof(TileMapState, ptr_SpecialAreasArray),
};

}
}
}

/**
Shared prologue of both neighbour fills. Leaves

edx = specialAreasArray
esi = &pathConnectionLayer[DAT_SomeTile] (a copy is pushed for the body)
edi = row DAT_SomeY of the movement direction translation matrix

Both inputs are read back out of the globals, which is what makes these
sequences unreachable from C++: MSVC forwards the value it just stored and
folds the repeated address arithmetic, so it emits neither the reloads nor
the doubling-by-two-adds that the original uses.
*/
#define MACRO_ASM_LOAD_CARDINAL_BASES() \
__asm mov edi, dword ptr ds:[ASM_TileMapState_ptr_MovementDirectionTranslationMatrix] \
__asm mov esi, dword ptr ds:[ASM_TileMapState_ptr_PathConnectionLayer] \
__asm mov edx, dword ptr ds:[ASM_TileMapState_ptr_SpecialAreasArray] \
__asm mov eax, dword ptr ds:[ASM_TileMapState_DAT_SomeTile] \
__asm shl eax, 1 \
__asm add esi, eax \
__asm push esi \
__asm mov eax, dword ptr ds:[ASM_TileMapState_DAT_SomeY] \
__asm shl eax, 5 \
__asm add edi, eax

/**
Fill the four even slots of `specialAreasArray` with the path connection
values of the four cardinal neighbours of `DAT_SomeTile`.

C++ equivalent, with the bases as named by MACRO_ASM_LOAD_CARDINAL_BASES:

pSpecialAreas[2] = pConnection[1];
pSpecialAreas[6] = pConnection[-1];
pSpecialAreas[0] = pConnection[pDirection[0]];
pSpecialAreas[4] = pConnection[pDirection[4]];

Clobbers eax, ebx, ecx, edx, esi, edi.
*/
#define MACRO_ASM_FILL_CARDINAL_PATH_CONNECTIONS() \
MACRO_ASM_LOAD_CARDINAL_BASES() \
__asm mov bx, word ptr [esi + 2] \
__asm mov ax, word ptr [esi - 2] \
__asm mov word ptr [edx + 4], bx \
__asm mov word ptr [edx + 0xC], ax \
__asm mov ecx, dword ptr [edi] \
__asm add esi, ecx \
__asm add esi, ecx \
__asm mov bx, word ptr [esi] \
__asm mov ecx, dword ptr [edi + 0x10] \
__asm pop esi \
__asm add esi, ecx \
__asm add esi, ecx \
__asm mov ax, word ptr [esi] \
__asm mov word ptr [edx], bx \
__asm mov word ptr [edx + 8], ax

/**
Fill the four odd slots of `specialAreasArray` with the path connection
values either side of the two diagonal neighbours of `DAT_SomeTile`.

Same prologue and the same unreachable-from-C++ reasoning; only the tile each
pair is taken around, and the slots written, differ.

C++ equivalent:

pSpecialAreas[1] = pConnection[pDirection[0] + 1];
pSpecialAreas[7] = pConnection[pDirection[0] - 1];
pSpecialAreas[3] = pConnection[pDirection[4] + 1];
pSpecialAreas[5] = pConnection[pDirection[4] - 1];

Clobbers eax, ebx, ecx, edx, esi, edi.
*/
#define MACRO_ASM_FILL_DIAGONAL_PATH_CONNECTIONS() \
MACRO_ASM_LOAD_CARDINAL_BASES() \
__asm mov ecx, dword ptr [edi] \
__asm add esi, ecx \
__asm add esi, ecx \
__asm mov bx, word ptr [esi + 2] \
__asm mov ax, word ptr [esi - 2] \
__asm mov word ptr [edx + 2], bx \
__asm mov word ptr [edx + 0xE], ax \
__asm mov ecx, dword ptr [edi + 0x10] \
__asm pop esi \
__asm add esi, ecx \
__asm add esi, ecx \
__asm mov bx, word ptr [esi + 2] \
__asm mov ax, word ptr [esi - 2] \
__asm mov word ptr [edx + 6], bx \
__asm mov word ptr [edx + 0xA], ax
2 changes: 1 addition & 1 deletion src/OpenSHC/Map/Units/TroopValueState.func.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ namespace Map {
false, Address::SHC_3BB0A8C1_0x00518870, &TroopValueState::applyTribeBehaviorTypes)
applyTribeBehaviorTypes;

MACRO_FUNCTION_RESOLVER(void (TroopValueState::*)(SomeTribeBehaviorType, undefined4, short, short), false,
MACRO_FUNCTION_RESOLVER(void (TroopValueState::*)(SomeTribeBehaviorType, undefined4, int, int), false,
Address::SHC_3BB0A8C1_0x00518930, &TroopValueState::assignBehaviorTypeToNearbyTribes)
assignBehaviorTypeToNearbyTribes;

Expand Down
2 changes: 1 addition & 1 deletion src/OpenSHC/Map/Units/TroopValueState.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ namespace Map {
SomeTribeBehaviorType tribeBehaviorType, SomeTribeBehaviorType tribeBehaviorType2, int off1, int off2);

void assignBehaviorTypeToNearbyTribes(
SomeTribeBehaviorType param_1, undefined4 param_2, short param_3, short param_4);
SomeTribeBehaviorType tribeBehaviorType, undefined4 param_2, int upperLimitBase, int upperLimitStep);

void assignBehaviorTypeAndLinkSupportTribe(
int param_1, int param_2, SomeTribeBehaviorType param_3, undefined4 param_4, undefined4 param_5);
Expand Down
Loading
Loading