Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
198 commits
Select commit Hold shift + click to select a range
7abe46b
reimplement UpdateBurningAnimal1 100%
Aug 18, 2026
c4fba5a
reimplement UpdateBurningAnimal2 100%
Aug 18, 2026
609ef6d
reimplement UpdateSiegeTent 69.44% stuck
Aug 18, 2026
53eb86f
reimplement: SHC_3BB0A8C1_0x00530D50 100.00% Reimplemented
gynt Sep 25, 2026
36ad839
reimplement: SHC_3BB0A8C1_0x00530D70 78.05% idiv vs magic division
gynt Sep 25, 2026
84dce4b
reimplement: SHC_3BB0A8C1_0x00530C40 97.56% load scheduling
gynt Sep 25, 2026
6d8ad88
reimplement: SHC_3BB0A8C1_0x0053A020 89.29% loop precheck scheduling
gynt Sep 25, 2026
49ab79b
reimplement: SHC_3BB0A8C1_0x00530760 100.00% Reimplemented
gynt Sep 25, 2026
b192270
reimplement: SHC_3BB0A8C1_0x0051BE20 100.00% Reimplemented
gynt Sep 25, 2026
0930dc8
reimplement: SHC_3BB0A8C1_0x00530B40 100.00% Reimplemented
gynt Sep 25, 2026
e7dfb58
reimplement: SHC_3BB0A8C1_0x00530F20 80.39% loop precheck scheduling
gynt Sep 25, 2026
b8e7e73
reimplement: SHC_3BB0A8C1_0x00530EB0 100.00% Reimplemented
gynt Sep 25, 2026
2fc7e05
reimplement: SHC_3BB0A8C1_0x00549B30 100.00% Reimplemented
gynt Sep 25, 2026
9f3103d
reimplement: SHC_3BB0A8C1_0x00530CF0 100.00% Reimplemented
gynt Sep 25, 2026
37cd41d
reimplement: SHC_3BB0A8C1_0x00530E00 80.39% loop precheck scheduling
gynt Sep 25, 2026
0845204
reimplement: SHC_3BB0A8C1_0x0053CAC0 100.00% Reimplemented
gynt Sep 25, 2026
bd4d1d5
reimplement: SHC_3BB0A8C1_0x0053BC20 66.14% LTCG regs across calls
gynt Sep 25, 2026
9fd4871
reimplement: SHC_3BB0A8C1_0x00543B80 52.63% LTCG regs across calls
gynt Sep 25, 2026
5e96437
reimplement: SHC_3BB0A8C1_0x005401D0 51.78% LTCG regs across calls
gynt Sep 25, 2026
0adb264
reimplement: SHC_3BB0A8C1_0x005416B0 53.39% LTCG regs across calls
gynt Sep 25, 2026
e103100
reimplement: SHC_3BB0A8C1_0x00541A30 41.35% LTCG regs across calls
gynt Sep 25, 2026
171a691
reimplement: SHC_3BB0A8C1_0x00567320 48.31% LTCG regs across calls
gynt Sep 25, 2026
ec84561
reimplement: SHC_3BB0A8C1_0x00550A50 45.27% LTCG regs across calls
gynt Sep 25, 2026
e65a582
[OPENSHC]: type UpdateHorseArcher_DoShooting unitID parameter as int
gynt Sep 25, 2026
9fde7f2
reimplement: SHC_3BB0A8C1_0x00575820 70.33% LTCG regs across calls
gynt Sep 25, 2026
903b83a
reimplement: SHC_3BB0A8C1_0x0053BE00 44.33% LTCG regs across calls
gynt Sep 25, 2026
8e14523
reimplement: SHC_3BB0A8C1_0x00549650 35.71% LTCG regs across calls
gynt Sep 25, 2026
46c3c12
reimplement: SHC_3BB0A8C1_0x00549090 37.10% LTCG regs across calls
gynt Sep 25, 2026
209f6d4
reimplement: SHC_3BB0A8C1_0x00542630 69.32% LTCG regs across calls
gynt Sep 25, 2026
3466faf
reimplement: SHC_3BB0A8C1_0x00542D10 39.41% LTCG regs across calls
gynt Sep 25, 2026
2ad6e75
[OPENSHC]: merge MapAndTimeState fields 0xa8-0xc8 into ownLossesArray[9]
gynt Sep 25, 2026
35589e7
reimplement: SHC_3BB0A8C1_0x005464F0 37.97% LTCG_regs
gynt Sep 25, 2026
dbaa980
reimplement: SHC_3BB0A8C1_0x00554500 55.05% LTCG_regs
gynt Sep 25, 2026
b3d9191
reimplement: SHC_3BB0A8C1_0x00566010 44.16% LTCG_regs
gynt Sep 25, 2026
f7d126f
reimplement: SHC_3BB0A8C1_0x00541DE0 36.18% LTCG_regs
gynt Sep 25, 2026
6401342
reimplement: SHC_3BB0A8C1_0x00551980 43.99% LTCG_regs
gynt Sep 25, 2026
f791380
reimplement: SHC_3BB0A8C1_0x0053C300 49.29% LTCG_regs
gynt Sep 25, 2026
6b8b0c2
reimplement: SHC_3BB0A8C1_0x00540EC0 50.68% LTCG_regs
gynt Sep 25, 2026
c703e13
reimplement: SHC_3BB0A8C1_0x0053F940 62.84% LTCG_regs
gynt Sep 25, 2026
5f0c92a
[OPENSHC]: type Unit::unknownV as short
gynt Sep 25, 2026
92d9507
[OPENSHC]: type Building::wheatGrowStateRelated as short
gynt Sep 25, 2026
515a714
reimplement: SHC_3BB0A8C1_0x00543340 39.28% LTCG_regs
gynt Sep 25, 2026
8b5a376
reimplement: SHC_3BB0A8C1_0x00543DC0 53.73% LTCG_regs
gynt Sep 25, 2026
105767f
reimplement: SHC_3BB0A8C1_0x0056B0E0 52.81% LTCG_regs
gynt Sep 25, 2026
01cf3a2
reimplement: SHC_3BB0A8C1_0x00563910 22.89% LTCG_regs
gynt Sep 25, 2026
91be34d
reimplement: SHC_3BB0A8C1_0x0056F9B0 50.04% LTCG_regs
gynt Sep 25, 2026
e368a00
reimplement: SHC_3BB0A8C1_0x00540440 47.79% LTCG_regs
gynt Sep 25, 2026
dff3fd0
reimplement: SHC_3BB0A8C1_0x00554CC0 26.39% LTCG_regs
gynt Sep 25, 2026
4c7f4b4
reimplement: SHC_3BB0A8C1_0x00552F80 50.99% LTCG_regs
gynt Sep 25, 2026
530a3db
reimplement: SHC_3BB0A8C1_0x005459B0 46.93% LTCG_regs
gynt Sep 25, 2026
40dc871
reimplement: SHC_3BB0A8C1_0x00558CB0 26.82% shared_tail_duplicated
gynt Sep 25, 2026
3062b29
reimplement: SHC_3BB0A8C1_0x005565D0 55.52% LTCG_regs
gynt Sep 25, 2026
99f9b5b
reimplement: SHC_3BB0A8C1_0x00550D70 53.35% LTCG_regs
gynt Sep 25, 2026
69e0814
reimplement: SHC_3BB0A8C1_0x00553AE0 43.32% LTCG_regs
gynt Sep 25, 2026
146023d
reimplement: SHC_3BB0A8C1_0x0056E190 42.00% LTCG_regs
gynt Sep 25, 2026
09935e7
reimplement: SHC_3BB0A8C1_0x0056B970 19.74% LTCG_regs
gynt Sep 25, 2026
3f9d400
reimplement: SHC_3BB0A8C1_0x00557230 44.16% LTCG_regs
gynt Sep 25, 2026
98b7a61
cmake: compile Map/Units reimplementations and their callees with /GL…
gynt Sep 25, 2026
159da06
reimplement: SHC_3BB0A8C1_0x00555880 51.69% LTCG_regs
gynt Sep 25, 2026
a2d2adb
reimplement: SHC_3BB0A8C1_0x00557F70 51.11% LTCG_regs
gynt Sep 25, 2026
bcafab8
reimplement: SHC_3BB0A8C1_0x0056A3F0 40.32% LTCG_regs
gynt Sep 25, 2026
b8b2363
reimplement: SHC_3BB0A8C1_0x00546BC0 44.76% LTCG_regs
gynt Sep 25, 2026
90d6016
reimplement: SHC_3BB0A8C1_0x00567640 35.36% LTCG_regs
gynt Sep 25, 2026
e44a5a0
reimplement: SHC_3BB0A8C1_0x0056ECD0 32.08% LTCG_regs
gynt Sep 25, 2026
94a6fd5
reimplement: SHC_3BB0A8C1_0x005521D0 39.73% LTCG_regs
gynt Sep 25, 2026
4812579
reimplement: SHC_3BB0A8C1_0x00575C40 43.50% LTCG_regs
gynt Sep 25, 2026
a417909
cmake: add batch 7 Map/Units functions and callees to /GL list
gynt Sep 25, 2026
7e5729a
reimplement: SHC_3BB0A8C1_0x00561C10 44.04% LTCG_regs
gynt Sep 25, 2026
3ffdf63
Unit: horseOriginStableIDUnk is an int
gynt Sep 25, 2026
968bbc1
reimplement: SHC_3BB0A8C1_0x00562AA0 49.02% LTCG_regs
gynt Sep 25, 2026
f567a48
reimplement: SHC_3BB0A8C1_0x0057AB50 40.84% LTCG_regs
gynt Sep 25, 2026
a61c888
reimplement: SHC_3BB0A8C1_0x0053EAA0 31.61% LTCG_regs
gynt Sep 25, 2026
7ec4ed1
reimplement: SHC_3BB0A8C1_0x0054D8F0 41.41% LTCG_regs
gynt Sep 25, 2026
714f582
reimplement: SHC_3BB0A8C1_0x005598D0 37.28% LTCG_regs
gynt Sep 25, 2026
525a6eb
reimplement: SHC_3BB0A8C1_0x00566750 57.72% LTCG_regs
gynt Sep 25, 2026
c9a76ac
reimplement: SHC_3BB0A8C1_0x00577CC0 47.90% LTCG_regs
gynt Sep 25, 2026
a3f9564
cmake: add batch 8 Map/Units functions and callees to /GL list
gynt Sep 25, 2026
92df888
reimplement: SHC_3BB0A8C1_0x00569410 39.11% LTCG_regs
gynt Sep 25, 2026
d5fb6c1
reimplement: SHC_3BB0A8C1_0x00568320 41.13% LTCG_regs
gynt Sep 25, 2026
0297f00
reimplement: SHC_3BB0A8C1_0x005769F0 42.34% LTCG_regs
gynt Sep 25, 2026
1f2f3bf
reimplement: SHC_3BB0A8C1_0x00571C00 43.44% LTCG_regs
gynt Sep 25, 2026
80b1513
reimplement: SHC_3BB0A8C1_0x0054C710 37.90% LTCG_regs
gynt Sep 25, 2026
76bb533
reimplement: SHC_3BB0A8C1_0x0054F860 48.51% LTCG_regs
gynt Sep 25, 2026
706cf01
reimplement: SHC_3BB0A8C1_0x00544750 32.40% LTCG_regs
gynt Sep 25, 2026
192307c
reimplement: SHC_3BB0A8C1_0x0054E6C0 35.44% LTCG_regs
gynt Sep 25, 2026
b24aca6
cmake: add batch 9 Map/Units functions and callees to /GL list
gynt Sep 25, 2026
43f68e4
reimplement: SHC_3BB0A8C1_0x0055C7B0 31.63% LTCG_regs
gynt Sep 25, 2026
8ddb499
reimplement: SHC_3BB0A8C1_0x00570400 47.67% LTCG_regs
gynt Sep 25, 2026
07bc13f
reimplement: SHC_3BB0A8C1_0x0055A800 35.97% LTCG_regs
gynt Sep 25, 2026
30448d6
reimplement: SHC_3BB0A8C1_0x00572E80 28.29% LTCG_regs
gynt Sep 25, 2026
9c8abab
reimplement: SHC_3BB0A8C1_0x00560700 36.41% LTCG_regs
gynt Sep 25, 2026
4630f86
reimplement: SHC_3BB0A8C1_0x0055F110 41.54% LTCG_regs
gynt Sep 25, 2026
be18ccc
reimplement: SHC_3BB0A8C1_0x0055DA50 38.12% LTCG_regs
gynt Sep 25, 2026
982d7f0
reimplement: SHC_3BB0A8C1_0x005744D0 39.56% LTCG_regs
gynt Sep 25, 2026
fd0aa4d
reimplement: SHC_3BB0A8C1_0x0056C560 39.88% LTCG_regs
gynt Sep 25, 2026
9c3180b
Building.hpp: name short at 0x2A0 waitingEngineerIDUnk
gynt Sep 25, 2026
01f37c5
reimplement: SHC_3BB0A8C1_0x00564250 31.91% LTCG_regs
gynt Sep 25, 2026
06ebdf6
reimplement: SHC_3BB0A8C1_0x005477C0 25.50% LTCG_regs
gynt Sep 25, 2026
2f80936
cmake: add batch 10 Update* functions and callees to /GL list
gynt Sep 25, 2026
2fe31a8
Map/Units: fix stale __stdcall and field name in BurningAnimal/SiegeTent
gynt Sep 25, 2026
c68a591
cmake: drop parameterised Map/Units helpers from /GL list
gynt Sep 25, 2026
33b7617
cmake: drop SetRestingForUnit from /GL list
gynt Sep 25, 2026
3960d70
reimplement: SHC_3BB0A8C1_0x0051BE20 100.00% Reimplemented
gynt Sep 25, 2026
8d684a9
reimplement: SHC_3BB0A8C1_0x005307B0 69.44% restyled
gynt Sep 25, 2026
d1b0231
reimplement: SHC_3BB0A8C1_0x00570400 51.95% Style pass, asm differs
gynt Sep 25, 2026
dc09474
reimplement: SHC_3BB0A8C1_0x00575C40 53.81% Style pass, asm differs
gynt Sep 25, 2026
27d6978
reimplement: SHC_3BB0A8C1_0x00558CB0 30.95% Style pass, asm differs
gynt Sep 25, 2026
7ffb455
reimplement: SHC_3BB0A8C1_0x005744D0 44.69% Style pass, asm differs
gynt Sep 25, 2026
aa0d801
reimplement: SHC_3BB0A8C1_0x00555880 57.72% Style pass, asm differs
gynt Sep 25, 2026
98a4662
reimplement: SHC_3BB0A8C1_0x005459B0 52.67% Style pass, asm differs
gynt Sep 25, 2026
823c707
reimplement: SHC_3BB0A8C1_0x00557F70 56.13% Style pass, asm differs
gynt Sep 25, 2026
284b976
reimplement: SHC_3BB0A8C1_0x005565D0 62.38% Style pass, asm differs
gynt Sep 25, 2026
10e5688
reimplement: SHC_3BB0A8C1_0x0056F9B0 54.52% Style pass, asm differs
gynt Sep 25, 2026
4354b77
reimplement: SHC_3BB0A8C1_0x00568320 44.87% Style pass, asm differs
gynt Sep 25, 2026
c914600
reimplement: SHC_3BB0A8C1_0x005464F0 40.51% Style pass, asm differs
gynt Sep 25, 2026
948147d
reimplement: SHC_3BB0A8C1_0x005477C0 27.32% Style pass, asm differs
gynt Sep 25, 2026
8802c9f
reimplement: SHC_3BB0A8C1_0x00542D10 42.65% Style pass, asm differs
gynt Sep 25, 2026
21fe19a
reimplement: SHC_3BB0A8C1_0x0055C7B0 40.98% Style pass, asm differs
gynt Sep 25, 2026
7737541
reimplement: SHC_3BB0A8C1_0x0055A800 40.11% Style pass, asm differs
gynt Sep 25, 2026
e3244b8
reimplement: SHC_3BB0A8C1_0x00564250 36.74% Style pass, asm differs
gynt Sep 25, 2026
b66f4b3
reimplement: SHC_3BB0A8C1_0x00577CC0 51.30% Style pass, asm differs
gynt Sep 25, 2026
9743265
reimplement: SHC_3BB0A8C1_0x00543340 43.29% Style pass, asm differs
gynt Sep 25, 2026
e832e45
reimplement: SHC_3BB0A8C1_0x0054D8F0 31.26% Style pass, asm differs
gynt Sep 25, 2026
e248d10
reimplement: SHC_3BB0A8C1_0x00543B80 60.35% Style pass, asm differs
gynt Sep 25, 2026
2d6e422
reimplement: SHC_3BB0A8C1_0x00540440 57.41% Style pass, asm differs
gynt Sep 25, 2026
ccbca4c
reimplement: SHC_3BB0A8C1_0x0057AB50 44.56% Style pass, asm differs
gynt Sep 25, 2026
9f9546f
reimplement: SHC_3BB0A8C1_0x0054F860 52.15% Style pass, asm differs
gynt Sep 25, 2026
7f24f78
reimplement: SHC_3BB0A8C1_0x0056B970 23.07% Style pass, asm differs
gynt Sep 25, 2026
93b5ce0
reimplement: SHC_3BB0A8C1_0x0056E190 50.14% Style pass, asm differs
gynt Sep 25, 2026
bb5f008
reimplement: SHC_3BB0A8C1_0x00562AA0 55.10% Style pass, asm differs
gynt Sep 25, 2026
df6b948
reimplement: SHC_3BB0A8C1_0x0056B0E0 57.43% Style pass, asm differs
gynt Sep 25, 2026
8fc3581
reimplement: SHC_3BB0A8C1_0x0056C560 44.93% Style pass, asm differs
gynt Sep 25, 2026
05fde9d
reimplement: SHC_3BB0A8C1_0x00560700 43.99% Style pass, asm differs
gynt Sep 25, 2026
8372c08
reimplement: SHC_3BB0A8C1_0x005416B0 63.80% Style pass, asm differs
gynt Sep 25, 2026
4b7d935
reimplement: SHC_3BB0A8C1_0x00541A30 46.84% Style pass, asm differs
gynt Sep 25, 2026
9172ce9
reimplement: SHC_3BB0A8C1_0x00554CC0 35.76% Style pass, asm differs
gynt Sep 25, 2026
a2fddde
reimplement: SHC_3BB0A8C1_0x00566010 49.78% Style pass, asm differs
gynt Sep 25, 2026
da0d96a
reimplement: SHC_3BB0A8C1_0x00567640 40.89% Style pass, asm differs
gynt Sep 25, 2026
2bf62f6
reimplement: SHC_3BB0A8C1_0x00546BC0 50.36% Style pass, asm differs
gynt Sep 25, 2026
d2b6f9e
reimplement: SHC_3BB0A8C1_0x0053EAA0 37.12% Style pass, asm differs
gynt Sep 25, 2026
3cc1249
reimplement: SHC_3BB0A8C1_0x00551980 49.22% Style pass, asm differs
gynt Sep 25, 2026
29624ac
reimplement: SHC_3BB0A8C1_0x00557230 48.41% Style pass, asm differs
gynt Sep 25, 2026
b389b78
reimplement: SHC_3BB0A8C1_0x00566750 63.25% Style pass, asm differs
gynt Sep 25, 2026
cfa098f
reimplement: SHC_3BB0A8C1_0x00571C00 49.88% Style pass, asm differs
gynt Sep 25, 2026
a43cf47
reimplement: SHC_3BB0A8C1_0x00572E80 31.60% Style pass, asm differs
gynt Sep 25, 2026
0816e82
reimplement: SHC_3BB0A8C1_0x0055DA50 50.99% Style pass, asm differs
gynt Sep 25, 2026
b9c82dc
reimplement: SHC_3BB0A8C1_0x00561C10 51.51% Style pass, asm differs
gynt Sep 25, 2026
d9f2f81
reimplement: SHC_3BB0A8C1_0x005598D0 44.92% Style pass, asm differs
gynt Sep 25, 2026
ece8d64
reimplement: SHC_3BB0A8C1_0x00569410 42.48% Style pass, asm differs
gynt Sep 25, 2026
5a1c78e
reimplement: SHC_3BB0A8C1_0x0054E6C0 42.20% Style pass, asm differs
gynt Sep 25, 2026
98423cb
reimplement: SHC_3BB0A8C1_0x005521D0 24.52% Style pass, asm differs
gynt Sep 25, 2026
55009cd
reimplement: SHC_3BB0A8C1_0x0054C710 42.93% Style pass, asm differs
gynt Sep 25, 2026
bc487ad
reimplement: SHC_3BB0A8C1_0x0056A3F0 42.92% Style pass, asm differs
gynt Sep 25, 2026
6458bca
reimplement: SHC_3BB0A8C1_0x00541DE0 64.64% cases in jump-table order
gynt Sep 25, 2026
afda7ec
reimplement: SHC_3BB0A8C1_0x00563910 37.19% cases in jump-table order
gynt Sep 25, 2026
49bd9c9
reimplement: SHC_3BB0A8C1_0x00542630 79.00% cases in jump-table order
gynt Sep 25, 2026
5ae2ff3
reimplement: SHC_3BB0A8C1_0x00575C40 54.61% Style pass, asm differs
gynt Sep 25, 2026
7e9039d
reimplement: SHC_3BB0A8C1_0x005744D0 44.69% Style pass, asm differs
gynt Sep 25, 2026
0ab0162
reimplement: SHC_3BB0A8C1_0x005459B0 52.83% Style pass, asm differs
gynt Sep 25, 2026
a3e1ab0
reimplement: SHC_3BB0A8C1_0x0056F9B0 54.68% Style pass, asm differs
gynt Sep 25, 2026
efbb0df
reimplement: SHC_3BB0A8C1_0x00568320 44.97% Style pass, asm differs
gynt Sep 25, 2026
3c83b2c
reimplement: SHC_3BB0A8C1_0x00542D10 42.65% Style pass, asm differs
gynt Sep 25, 2026
4bc6eb7
reimplement: SHC_3BB0A8C1_0x0055A800 40.11% Style pass, asm differs
gynt Sep 25, 2026
20c9a72
reimplement: SHC_3BB0A8C1_0x00564250 36.79% Style pass, asm differs
gynt Sep 25, 2026
141a491
reimplement: SHC_3BB0A8C1_0x005769F0 47.02% Style pass, asm differs
gynt Sep 25, 2026
794dcd1
reimplement: SHC_3BB0A8C1_0x00540440 57.61% Style pass, asm differs
gynt Sep 25, 2026
a7ad6f9
reimplement: SHC_3BB0A8C1_0x0057AB50 44.66% Style pass, asm differs
gynt Sep 25, 2026
3631a97
reimplement: SHC_3BB0A8C1_0x00563910 37.35% Style pass, asm differs
gynt Sep 25, 2026
db483bd
reimplement: SHC_3BB0A8C1_0x0056C560 45.30% Style pass, asm differs
gynt Sep 25, 2026
d988ca6
reimplement: SHC_3BB0A8C1_0x00544750 38.91% Style pass, asm differs
gynt Sep 25, 2026
e61e5a5
reimplement: SHC_3BB0A8C1_0x00572E80 31.60% Style pass, asm differs
gynt Sep 25, 2026
7a7639c
reimplement: SHC_3BB0A8C1_0x00569410 42.59% Style pass, asm differs
gynt Sep 25, 2026
38bd651
batch helpers: tools for finding non-register-allocation diffs
gynt Sep 25, 2026
76269a6
reimplement: SHC_3BB0A8C1_0x0056B970 24.90% int index, orig branch order
gynt Sep 25, 2026
e8dd5f7
reimplement: SHC_3BB0A8C1_0x00542D10 42.70% int index local
gynt Sep 25, 2026
dab4c1d
reimplement: SHC_3BB0A8C1_0x0053F940 67.64% int index local
gynt Sep 25, 2026
d839367
reimplement: SHC_3BB0A8C1_0x00550D70 59.76% int index local
gynt Sep 25, 2026
e3fc5d9
reimplement: SHC_3BB0A8C1_0x0056B0E0 59.36% int index local
gynt Sep 25, 2026
cf15f54
reimplement: SHC_3BB0A8C1_0x0053C300 52.39% int index local
gynt Sep 25, 2026
ef7173f
batch helpers: diff_reasons.py, report where each function first real…
gynt Sep 25, 2026
efe5e8e
batch helpers: focus.py and gl_flags.py, remove duplicated diff plumbing
gynt Sep 25, 2026
644cceb
batch helpers: focus.py retries after the list changes, diff_reasons …
gynt Sep 25, 2026
2cab3ed
Merge remote-tracking branch 'origin/main' into reimpl/map-units-upda…
gynt Oct 23, 2026
6565c1b
fix(map-units): make the branch build and measure against current main
gynt Oct 23, 2026
974c32f
style(map-units): own-namespace include first, and clang-format
gynt Nov 2, 2026
c933f79
Adopt the Wilps Map/Units bodies that measure better here (#286)
gynt Nov 2, 2026
48b79a2
Merge branch 'main' into reimpl/map-units-updatefunctions
gynt Nov 4, 2026
5d24ff7
Merge origin/main into reimpl/map-units-updatefunctions
gynt Dec 5, 2026
0c29fee
fix the unit-update drafts against main's headers after the merge
gynt Dec 5, 2026
b541e1e
build: compile the eight unit-update drafts with /GL
gynt Dec 5, 2026
4f4f87a
reimplement: SHC_3BB0A8C1_0x005464F0 98.6% UpdateChicken as one state…
gynt Dec 5, 2026
3283a18
reimplement: SHC_3BB0A8C1_0x00549090 71.4% UpdateJuggler in UpdateFir…
gynt Dec 5, 2026
42397c4
reimplement: SHC_3BB0A8C1_0x005565D0 71.4% UpdateBrewer as one state …
gynt Dec 5, 2026
4e379b1
reimplement: SHC_3BB0A8C1_0x00560700 69.9% UpdateMaceman reads the un…
gynt Dec 5, 2026
b6b9d25
reimplement: SHC_3BB0A8C1_0x00544750 62.4% UpdateSiegeTower reads the…
gynt Dec 5, 2026
3ea852f
reimplement: SHC_3BB0A8C1_0x0056C560 57.2% UpdateLord reads the unit …
gynt Dec 5, 2026
0d5b190
reimplement: SHC_3BB0A8C1_0x00542D10 56.9% UpdateCow reads the unit t…
gynt Dec 5, 2026
99bbba7
reimplement: SHC_3BB0A8C1_0x00567640 52.7% UpdateMonk reads the unit …
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
8 changes: 8 additions & 0 deletions cmake/compiler-flags-gl.txt
Original file line number Diff line number Diff line change
Expand Up @@ -459,3 +459,11 @@ src/OpenSHC/Map/Units/UpdateArmorer.cpp
src/OpenSHC/Map/Units/UpdateTanner.cpp
src/OpenSHC/Map/Units/UpdateQuarryWorker.cpp
src/OpenSHC/Map/Units/UpdateBaker.cpp
src/OpenSHC/Map/Units/UpdateBrewer.cpp
src/OpenSHC/Map/Units/UpdateLord.cpp
src/OpenSHC/Map/Units/UpdateMaceman.cpp
src/OpenSHC/Map/Units/UpdateCow.cpp
src/OpenSHC/Map/Units/UpdateMonk.cpp
src/OpenSHC/Map/Units/UpdateChicken.cpp
src/OpenSHC/Map/Units/UpdateSiegeTower.cpp
src/OpenSHC/Map/Units/UpdateJuggler.cpp
540 changes: 540 additions & 0 deletions src/OpenSHC/Map/Units/UpdateBrewer.cpp

Large diffs are not rendered by default.

325 changes: 325 additions & 0 deletions src/OpenSHC/Map/Units/UpdateChicken.cpp

Large diffs are not rendered by default.

309 changes: 309 additions & 0 deletions src/OpenSHC/Map/Units/UpdateCow.cpp

Large diffs are not rendered by default.

316 changes: 316 additions & 0 deletions src/OpenSHC/Map/Units/UpdateJuggler.cpp

Large diffs are not rendered by default.

1,215 changes: 1,215 additions & 0 deletions src/OpenSHC/Map/Units/UpdateLord.cpp

Large diffs are not rendered by default.

979 changes: 979 additions & 0 deletions src/OpenSHC/Map/Units/UpdateMaceman.cpp

Large diffs are not rendered by default.

598 changes: 598 additions & 0 deletions src/OpenSHC/Map/Units/UpdateMonk.cpp

Large diffs are not rendered by default.

773 changes: 773 additions & 0 deletions src/OpenSHC/Map/Units/UpdateSiegeTower.cpp

Large diffs are not rendered by default.

16 changes: 8 additions & 8 deletions status/addresses-SHC-3BB0A8C1.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61229,15 +61229,15 @@ SHC_3BB0A8C1_0x00542D04 | 0.0% | Pending

SHC_3BB0A8C1_0x00542D05 | 0.0% | Pending

SHC_3BB0A8C1_0x00542D10 | 0.0% | Pending
SHC_3BB0A8C1_0x00542D10 | 56.9% | Register allocation and block layout differ

SHC_3BB0A8C1_0x00543340 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x00543B80 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x00543DC0 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x00544750 | 0.0% | Pending
SHC_3BB0A8C1_0x00544750 | 62.4% | Register allocation and block layout differ

SHC_3BB0A8C1_0x005451A0 | 0.0% | Pending

Expand All @@ -61251,7 +61251,7 @@ SHC_3BB0A8C1_0x00545D30 | 0.0% | Pending

SHC_3BB0A8C1_0x00545F00 | 0.0% | Pending

SHC_3BB0A8C1_0x005464F0 | 0.0% | Pending
SHC_3BB0A8C1_0x005464F0 | 98.6% | Two register choices differ: the random facing byte (dx against cx) and one frame-table index

SHC_3BB0A8C1_0x00546BA0 | 0.0% | Pending

Expand Down Expand Up @@ -61371,7 +61371,7 @@ SHC_3BB0A8C1_0x00549082 | 0.0% | Pending

SHC_3BB0A8C1_0x00549083 | 0.0% | Pending

SHC_3BB0A8C1_0x00549090 | 0.0% | Pending
SHC_3BB0A8C1_0x00549090 | 71.4% | The constant 1 takes ebp (callee-saved) as in UpdateFireEater, while the original keeps it in ecx and writes later uses as immediates

SHC_3BB0A8C1_0x00549620 | 0.0% | Pending

Expand Down Expand Up @@ -62539,7 +62539,7 @@ SHC_3BB0A8C1_0x00554CC0 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x00555880 | 93.2% | 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on

SHC_3BB0A8C1_0x005565D0 | 0.0% | Pending
SHC_3BB0A8C1_0x005565D0 | 71.4% | Block layout differs: the original hoists the animation cycle load above the substate chain and lays the hops-taken path out of line

SHC_3BB0A8C1_0x00557230 | 81.0% | 100.0 with OPENSHC_FUNCTION_VISIBILITY_UNITS on

Expand Down Expand Up @@ -63723,7 +63723,7 @@ SHC_3BB0A8C1_0x005606FC | 0.0% | Pending

SHC_3BB0A8C1_0x005606FD | 0.0% | Pending

SHC_3BB0A8C1_0x00560700 | 0.0% | Pending
SHC_3BB0A8C1_0x00560700 | 69.9% | Register allocation and block layout differ

SHC_3BB0A8C1_0x00561B3C | 0.0% | Pending

Expand Down Expand Up @@ -65161,7 +65161,7 @@ SHC_3BB0A8C1_0x00566750 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x00567320 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x00567640 | 0.0% | Pending
SHC_3BB0A8C1_0x00567640 | 52.7% | Register allocation and block layout differ

SHC_3BB0A8C1_0x00568264 | 0.0% | Pending

Expand Down Expand Up @@ -65461,7 +65461,7 @@ SHC_3BB0A8C1_0x0056B0E0 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x0056B970 | 100.0% | Reimplemented

SHC_3BB0A8C1_0x0056C560 | 0.0% | Pending
SHC_3BB0A8C1_0x0056C560 | 57.2% | Register allocation and block layout differ

SHC_3BB0A8C1_0x0056DAC0 | 0.0% | Pending

Expand Down
73 changes: 54 additions & 19 deletions tools/reimplementation-helper/batch/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -204,6 +204,51 @@ def entries(byaddr, files=None):
yield f, byaddr.get(int(address, 16)), address


SOURCE_LINE_RE = re.compile(r"\.cpp:(\d+)\)")
REGISTERS = r"(?:e?(?:ax|bx|cx|dx|si|di|bp|sp)|[abcd][lh])"


def diff_rows(entry):
"""Yield (kind, text, source line) for every row of a reccmp diff, in order.

kind is "both", "orig" or "recomp"; text is the row as reccmp prints it, instruction
first. Only our side carries a source annotation, so the line is carried forward until
the next one appears. Every script that reads a diff goes through here.
"""
line = None
for hunk in entry.get("diff") or []:
for block in hunk[1]:
for kind, rows in block.items():
for row in rows:
if kind != "orig":
m = SOURCE_LINE_RE.search(row[1])
if m:
line = int(m.group(1))
yield kind, row[1], line


def instruction(text):
"""A diff row without its source annotation."""
return text.split("\t")[0].strip()


def canonical(text, registers=True):
"""An instruction with call targets, template arguments and absolute addresses folded away.

With registers=False the register names go too, so that a difference which is only the
allocator's choice of register compares equal. This is for spotting *structural*
differences; _normalize below answers a different question (see normalized_ratio) and
deliberately folds more, so the two are not interchangeable.
"""
s = instruction(text)
s = re.sub(r"<OFFSET\d+>|trampoline<[^>]*>|FunctionResolver::\S+", "T", s)
s = re.sub(r"<[^>]*>", "<T>", s)
s = re.sub(r"0x[0-9a-f]{5,}", "A", s)
if not registers:
s = re.sub(r"\b%s\b" % REGISTERS, "r", s)
return s


def _normalize(line):
"""Reduce an asm line so call targets, resolver names and absolute addresses compare equal."""
s = line.split("\t")[0].strip()
Expand All @@ -220,17 +265,11 @@ def _normalize(line):

def _asm_lines(entry):
orig, recomp = [], []
for hunk in entry.get("diff") or []:
for block in hunk[1]:
for kind, rows in block.items():
if kind == "both":
for row in rows:
orig.append(row[1])
recomp.append(row[1])
elif kind == "orig":
orig += [row[1] for row in rows]
else:
recomp += [row[1] for row in rows]
for kind, row, _ in diff_rows(entry):
if kind != "recomp":
orig.append(row)
if kind != "orig":
recomp.append(row)
return orig, recomp


Expand All @@ -250,14 +289,10 @@ def normalized_ratio(entry):

def print_diff(entry):
print("### %s %.1f%% norm %.1f%%" % (entry["name"], float(entry["matching"]) * 100, normalized_ratio(entry) * 100))
for hunk in entry.get("diff") or []:
for block in hunk[1]:
for kind, rows in block.items():
prefix = {"both": " ", "orig": "-", "recomp": "+"}[kind]
for row in rows:
s = re.sub(r"FunctionResolver::Resolver<.*?,&([\w:]+),\d>::GameFunction.*", r"<\1>", row[1])
s = re.sub(r"StructResolver::Instance<([\w:]+),\d+>::", r"I<\1>::", s)
print(prefix + s)
for kind, row, _ in diff_rows(entry):
s = re.sub(r"FunctionResolver::Resolver<.*?,&([\w:]+),\d>::GameFunction.*", r"<\1>", row)
s = re.sub(r"StructResolver::Instance<([\w:]+),\d+>::", r"I<\1>::", s)
print({"both": " ", "orig": "-", "recomp": "+"}[kind] + s)


# ---------------------------------------------------------------- resolver index
Expand Down
79 changes: 79 additions & 0 deletions tools/reimplementation-helper/batch/compare_constants.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,79 @@
"""Diff the sequence of compare constants between the original and our build.

Every `cmp reg, imm` in the original is a literal from the source. Lining the two
sequences up shows, in one screen per function, which checks we get wrong, which we are
missing entirely and where a block sits in the wrong place -- things that are easy to miss
in a long instruction diff.

python compare_constants.py # every file in the sources list
python compare_constants.py UpdateMiner Map/Units/UpdateCow.cpp

A `-x / +y` pair that differs by one is an off-by-one literal (`> 31` where the original
wrote `>= 32`); fix_off_by_one.py rewrites those. A lone `-x` means the original tests
something we do not test at all; a run of lines moving together means our blocks are in a
different order than the original's.

Needs a reccmp run first (reccmp_report.py --run ...) so reccmp/dll/diff.json is current.
"""

import difflib
import re
import sys
from pathlib import Path

import common

CONSTANT_RE = re.compile(r"^(cmp|test) (?:byte|word|dword)? ?(?:ptr )?(?:\[[^\]]*\]|\w+), (0x[0-9a-f]+|\d+)$")
# 0 and 1 are mostly `test eax, eax` and flag checks: too common to carry information
IGNORED = (0, 1)


def constants(entry):
"""Constants compared against in the original and in our build.

Returns (original, ours, lines): parallel to `ours`, `lines` holds the source line the
instruction was attributed to (or None).
"""
original, ours, lines = [], [], []
for kind, row, line in common.diff_rows(entry):
m = CONSTANT_RE.match(common.instruction(row))
if not m:
continue
value = int(m.group(2), 0)
if value in IGNORED:
continue
token = "%s %#x" % (m.group(1), value)
if kind != "recomp":
original.append(token)
if kind != "orig":
ours.append(token)
lines.append(line)
return original, ours, lines


def select(names):
"""The sources list, filtered by function name or path substring."""
files = common.list_files()
if not names:
return files
chosen = [f for f in files if any(n in f or Path(f).stem == n for n in names)]
if not chosen:
sys.exit("no file in %s matches %s" % (common.SOURCES_LIST, names))
return chosen


def main():
names = [a for a in sys.argv[1:] if not a.startswith("--")]
byaddr = common.load_diff()
for _, entry, address in common.entries(byaddr, select(names)):
if entry is None:
continue
original, ours, _ = constants(entry)
print("### %s %.1f%%" % (entry["name"], float(entry["matching"]) * 100))
for line in difflib.unified_diff(original, ours, n=1, lineterm=""):
if not line.startswith(("---", "+++")):
print(" ", line)


if __name__ == "__main__":
main()
140 changes: 140 additions & 0 deletions tools/reimplementation-helper/batch/diff_reasons.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,140 @@
"""Report where each function's assembly first really diverges from the original.

A reccmp diff cascades: one differing instruction pushes everything after it out of step,
so the size of a diff says little about how much is actually wrong. What is worth acting on
is the *first* divergence that is not just a register choice, and the source line it is
attributed to. That is what this prints, one line (plus context) per function.

python diff_reasons.py # every file in the sources list
python diff_reasons.py --context 6 # more instructions around the divergence
python diff_reasons.py UpdateChild
python diff_reasons.py --full UpdateChild # the whole diff, registers folded away

Ordering is by source line, so the earliest divergence in each file comes first; fix that,
rebuild, and the next one appears. Differences that are only register names, only a call
target, or only prologue housekeeping are skipped, since the source cannot address those
(see the batch README).

Needs a current reccmp/dll/diff.json (reccmp_report.py --run ...).
"""

import difflib
import re
import sys

import common
import compare_constants

# housekeeping the register allocator places freely: a difference made only of these says
# nothing about the source
NOISE = re.compile(r"^(push r|pop r|mov r, r|mov r, dword ptr \[A\]|imul r, r, A|"
r"mov r, dword ptr \[StructResolver::Instance<T>::instance \(DATA\)\]|lea r, \[r\]|"
r"mov r, \d+|xor r, r|add r, r|sub r, r|nop.*|mov r, A)$")


def canonical(text):
"""The instruction with register names, call targets and absolute addresses removed."""
return common.canonical(text, registers=False)


# a conditional jump whose only difference is how far it reaches: a consequence of code
# elsewhere being a different size, never the cause
BRANCH = re.compile(r"^j\w+ -?0x[0-9a-f]+$")


def housekeeping_only(original, ours):
canon = [canonical(x) for x in original + ours]
if canon and all(BRANCH.match(x) for x in canon):
return True
return all(NOISE.match(x) for x in canon)


def first_divergence(entry):
"""(source line, original instructions, our instructions) at the first real difference."""
pending_original, pending_ours, line = [], [], None
for kind, row, at in common.diff_rows(entry):
text = common.instruction(row)
if kind == "both":
if pending_original or pending_ours:
# a run of replaced instructions ended; is any of it more than registers?
if ([canonical(x) for x in pending_original] != [canonical(x) for x in pending_ours]
and not housekeeping_only(pending_original, pending_ours)):
return line, pending_original, pending_ours
pending_original, pending_ours, line = [], [], None
continue
if kind == "orig":
pending_original.append(text)
else:
pending_ours.append(text)
line = line or at
if pending_original or pending_ours:
if ([canonical(x) for x in pending_original] != [canonical(x) for x in pending_ours]
and not housekeeping_only(pending_original, pending_ours)):
return line, pending_original, pending_ours
return None, [], []


def reason(original, ours):
"""A short guess at what kind of difference this is."""
co, cu = [canonical(x) for x in original], [canonical(x) for x in ours]
if sorted(co) == sorted(cu):
return "instruction scheduling"
if all(x.startswith(("call", "jmp T")) for x in co + cu):
return "call target"
if len(co) != len(cu):
return "different number of instructions"
return "different instructions"


def print_full(entry, context):
"""The whole diff with registers folded away, so only structure is left."""
original, ours = [], []
for kind, row, _ in common.diff_rows(entry):
if kind != "recomp":
original.append(canonical(row))
if kind != "orig":
ours.append(canonical(row))
print("### %s %.1f%% norm %.1f%%" % (entry["name"], float(entry["matching"]) * 100,
common.normalized_ratio(entry) * 100))
for line in difflib.unified_diff(original, ours, "orig", "ours", n=context, lineterm=""):
if not line.startswith(("---", "+++")):
print(line)


def main():
argv = sys.argv[1:]
context = 3
if "--context" in argv:
i = argv.index("--context")
context = int(argv[i + 1])
del argv[i:i + 2]
full = "--full" in argv
names = [a for a in argv if not a.startswith("--")]
byaddr = common.load_diff()
found = []
for path, entry, _ in common.entries(byaddr, compare_constants.select(names)):
if entry is None:
continue
if full:
print_full(entry, context)
continue
line, original, ours = first_divergence(entry)
found.append((line or 0, path, entry, line, original, ours))
found.sort(key=lambda r: (r[3] is None, r[0]))
for _, path, entry, line, original, ours in found:
name = entry["name"].split("::")[-1]
if line is None and not original:
print("%-26s %5.1f%% norm %5.1f%% nothing but registers, calls and prologue housekeeping" % (
name, float(entry["matching"]) * 100, common.normalized_ratio(entry) * 100))
continue
print("%-26s %5.1f%% norm %5.1f%% first divergence at %s:%s -- %s" % (
name, float(entry["matching"]) * 100, common.normalized_ratio(entry) * 100,
path.split("/")[-1], line, reason(original, ours)))
for text in original[:context]:
print(" orig " + text)
for text in ours[:context]:
print(" ours " + text)


if __name__ == "__main__":
main()
Loading