GoG symbol sync — progress#
Canonical names: src/LORDS2.EXE.c.
Target: src/Lords2-gog.exe.c.
Do not match by retail VA. Use map_gog_symbols.py → apply_gog_renames.py only.
Defer lotr2_net_* until ASIGS/DirectPlay equivalents exist.
Coverage (approximate ref counts)#
| Metric | GoG | Retail |
|---|---|---|
lotr2_* refs |
17380 | ~30177 |
FUN_* refs |
3796 | 0 (retail renamed) |
lotr2_combat_* refs |
4359 | — |
lotr2_gfx_* refs |
2710 | ~4092 |
lotr2_map_* refs |
619 | — |
Refresh:
python3 -c "import re; from pathlib import Path
for label,p in [('GoG','src/Lords2-gog.exe.c'),('Retail','src/LORDS2.EXE.c')]:
t=Path(p).read_text(errors='replace')
print(label, 'lotr2', len(re.findall(r'\\blotr2_[a-z0-9_]+\\b',t,re.I)),
'FUN', len(re.findall(r'\\bFUN_[0-9a-f]+\\b',t,re.I)))"
Phase queue#
| Order | Subsystem | Status | Mapped | Notes |
|---|---|---|---|---|
| 1 | ui |
done | 47 | 1 unmatched: lotr2_ui_wndproc_impl (retail-only) |
| 2 | startup |
done | 478 | game/asset/audio/crt bootstrap |
| 3 | game |
applied | 464 | 433 retail lotr2_game_* still unmatched |
| 4 | gfx |
applied | 78 | 100 retail lotr2_gfx_* unmatched |
| 5 | map |
done | 151 | 2 deferred: ai_pathfind_player_armies, ai_pick_nearest_attack_province |
| 6 | combat |
applied | 344 | 31 retail lotr2_combat_* unmatched (pass 39) |
| 7 | game (pass 2) |
plateau | 454 | re-map added 0; 443 unmatched need MANUAL_ANCHORS |
| 9 | game (pass 3) |
applied | 464 | +10 MANUAL_ANCHORS (AI turn phase, diplomacy submit, active_view DAT); gfx +1 palette_fade |
| 10 | game/gfx (pass 4) |
applied | 467 / 86 | +10 anchors: backbuf globals, fade arm/step, create_surface*, overlay arm; call-graph +3 game |
| 11 | game/gfx (pass 5) |
applied | 472 / 93 | +11 anchors: lobby flag, toolbar timer, dirty rect globals, buffer palette, dim rect |
| 12 | game/gfx (pass 6) |
applied | 483 / 96 | +14 anchors: build queue×4, diplomacy text×6, local_player_slot, blit_clip_x, palette remap |
| 13 | game/gfx (pass 7) |
applied | 484 / 105 | +10 anchors: replay mode, sprite blit cluster, row blitters, glyph_src_base |
| 14 | game/gfx (pass 8) |
applied | 500 / 113 | +24 anchors: settings/hicolor, noop 01–11, wizard panel, DD init chain, tile16 grids |
| 15 | game/gfx (pass 9) |
applied | 509 / 126 | +21 anchors: noop 12–20, ui yield, gfx hooks, DD globals, castle masks |
| 16 | gfx (pass 10) |
applied | 154 | +28 anchors: iso fills×9, pl8 loaders×4, dirty tiles×4, present/surface helpers |
| 17 | game/gfx (pass 11) |
applied | 524 / 178 | +28 anchors: stamp_pl8 cluster×23, replay speed×4, map scroll lock; parser fix for split-line Ghidra defs |
| 18 | game (pass 12) |
applied | 572 | +55 anchors: castle/history I/O, stub/noop cluster, turn-phase globals, MP send + SFX handlers |
| 19 | game (pass 13) |
applied | 628 | +56 anchors: AI turn loop, diplomacy queue×7, end-turn economy chain (call-graph from FUN_00448440 / FUN_0049a581) |
| 20 | game (pass 14) |
applied | 655 | +27 anchors: season events×8, siege×2, AI military×5, battle modals×6, save LZSS×4, sync aggregates |
| 21 | game (pass 15) |
applied | 674 | +19 anchors: build templates, diplomacy init, campaign bootstrap, build queue, RNG/dist helpers |
| 22 | game (pass 16) |
applied | 695 | +21 anchors: UI map blitters×9, screen_mode_tick, battle pathfind/enter, resource/allocation, MP scroll/menu validate, tax slider |
| 23 | game (pass 17) |
applied | 711 | +16 anchors: army_record_table, commit_map_cell_action, map entity draw cluster×13, copy_input_buffer_out |
| 24 | game (pass 18) |
applied | 733 | +22 anchors: self-anchors×9, dev saves, eng/text I/O, dialog noops×3, clip blit + clip_bridge alias |
| 25 | game (pass 19) |
applied | 749 | +16 anchors: eng wrap/multiline, fill patterns, armoury/gateway/overview, build palette, memcmp_n |
| 26 | game (pass 20) |
applied | 766 | +17 anchors: overview rows×8, menu measure/draw, vpattern alias, modal backdrop, dialog noops×2, diplomacy/faction dialogs, minimap, credits, input dispatch |
| 27 | game (pass 21) |
applied | 776 | +10 anchors: pass-19 self-anchors×18, map column bridge/clip fix, screen widgets, diplomacy minimap, province minimap, build queue, pending orders badge, battle compare rows |
| 28 | game (pass 22) |
applied | 793 | +17 anchors: pass-20/21 self-anchors×9, status rows, sliders/hit-test, great noble/merchant screens, wizard rect, season bar, siege prep/outcome/routed panels, signed delta glyph, noble pick leader |
| 29 | game (pass 23) |
applied | 806 | +13 anchors: popup/menu dialog cluster×7, widget input, scroll/tax/save/wizard/mode5 hit-tests, map column bridge/interior/clip fix, dialog noop 7 |
| 30 | game (pass 24) |
applied | 842 | +36 anchors: wizard cluster×20, state globals×5, province/siege HUD fix, fill patterns, strstr/set_map_drag, wizard step handlers, self-anchors |
| 31 | game (pass 25) |
applied | 869 | +27 anchors: tax slider fix, battle input×8, text input×5, modal_active, write_lords2_inf, wizard province/faction/loading, upkeep tick, UI noops×2 |
| 32 | game (pass 26) |
applied | 883 | +14 anchors: province panel/minimap refresh, overview/tile/province actions, turn toolbar, village allocation, siege flow×3, army disband, screen_phase alias, toolbar context + event flags |
| 33 | game (pass 27) |
applied | 894 | +11 anchors: diplomacy_execute, deduct dev stock, event flush, raid pillage, cell scan DAT, scroll list/reset, misc/system PL8 load, save slot scroll, nop_player_redraw hook |
| 34 | game (pass 28) |
applied | 914 | +20 anchors: battle retreat, MP build stubs×3, sync_battle/net apply, build_menu net unpack, widget-table noops×14, wizard cancel modal, noop_295b positional fix |
| 35 | game (pass 29) |
done | 915 | +1 anchor: noop_4d39 → FUN_0043d5ac (stub after village allocation toggle); 0 unmatched |
| 36 | gfx (pass 30) |
done | 186 | +8 anchors: blit scaled/clipped, dirty noop, stamp _ext aliases; restored provenance; anchor resolver fix |
| 37 | map (pass 31) |
done | 151 | +76 anchors total (31a–31d): army/AI dispatch, tile/visibility, claim/rect, structure placement; 2 deferred (GoG AI step reorder) |
| 38 | combat (pass 32) |
applied | 209 | +26 anchors: pathfind/dirty-tile, battle HUD cluster, figure field globals (0x1b0 stride) |
| 39 | combat (pass 33) |
applied | 224 | +15 anchors: sprite advance/fire, battle outcome/tally, formation thresholds, group ranged tick |
| 40 | combat (pass 34) |
applied | 248 | +24 anchors: siege group tick orders, group-order goto/flank helpers, wall query, figure tier fields |
| 41 | combat (pass 35) |
applied | 260 | +12 anchors: message queue×6, battle enter/HUD/music, scroll edge, figure target_slot |
| 42 | combat (pass 36) |
applied | 278 | +16 anchors: projectiles×3, exit/HUD/minimap/tooltip, siege init×3, defend_lane, unit score |
| 43 | combat (pass 37) |
applied | 297 | +19 anchors: battle bootstrap/spawn, tick loops, blit overlays, pathfind fix, open-field map fix |
| 44 | combat (pass 38) |
applied | 330 | +33 anchors: unit type ticks×11, attack damage, anim steps×3, siege figure ticks×6, parse/damage, group orders, scroll/strike music, wall face, figure DAT fix |
| 45 | combat (pass 39) |
applied | 344 | +18 anchors: self-anchors (enqueue/spawn batch), battle grid/coords×7, pathfind query, scroll reveal×3, projectile subpixel×2, tile-scan/group-order DATs; goto_flag fix |
| 46 | combat (pass 40) |
applied | 372 | +28 anchors: spawn/siege helpers, scroll reveal self-fix, smoke PL8, map click, stubs; 3 deferred (MP idle/gate, reset_campaign) |
| 47 | combat/game/ui (DAT pass 53) |
applied | 378 / 918 / 48 | +11 retail DAT globals: group table/indices, difficulty/culture, hover/tooltip, pointer dirty, great-noble column |
| 48 | combat (pass 41) |
applied | 378 | remap/apply refresh: 389 tuples applied; report now tracks 41 unmatched (clip/tile/viewport DAT clusters + MP idle/gate/reset stubs) for next anchor pass |
| 8 | io |
plateau | 0 | 2 retail symbols; likely covered by startup/crt |
| — | net |
deferred | — | no DirectPlay strings in GoG export |
Loop stop conditions#
- Subsystem:
apply_gog_renames.py --subsystem X --dry-runreports 0 new hits after remap. - Project: all phases through
combatapplied; net still deferred. - Manual: user says stop loop.
- Next iteration:
combat378 mapped / 41 unmatched: prioritize clip/tile/viewport DAT globals (lotr2_combat_clip_*,lotr2_combat_tile_*,lotr2_combat_viewport_*) plus deferredmp_frame_gate/tick_battle_idle_state/reset_campaign_battle_state.
Reports#
See gog-symbol-map.md index.