Files
DragonHD 9eed020634 Chinese main menu: font atlas + GB2312 tables + Strings translation
- build_cjk.py: 2048x1024 UI atlas (original ASCII at 0,0 + full GB2312 at 12px) and
  cjk_glyph/cjk_metric tables.
- cn_strings.py + make_cn_strings.py: escape-aware GB2312 rewrite of Strings.dat (46 entries).
- install_cjk.py: one-shot deploy/restore (exe patch, atlas loose+res, strings).
- apply_cjk.py: fix metrics cave code byte order (was (second<<8)|first) so CJK width
  measures correctly and centred labels are no longer flushed right.
- docs: DEVLOG + patch notes for the atlas and the fix.
2026-09-20 10:22:49 +08:00

1.9 KiB

The I of the Dragon — fan tools (localization + HD)

Reverse-engineering and localization tooling for The I of the Dragon (Topware / Primal Software).

This repository tracks only our own tools and documentation. It does not contain the game, its assets, or any cracked distribution — those are regenerated/produced locally from a legit copy.

Layout

tools/            Python tooling (unpack, repack, preprocess, font patch, decoders)
docs/             DEVLOG, format specs, patch notes

Working data (not tracked): original/, png/, report/, patch/, crack/.

Tooling

script purpose
tools/res_unpack.py extract a .res archive (index + raw blobs, 16-byte aligned)
tools/res_repack.py rebuild a .res byte-identically from a directory
tools/preprocess.py convert textures to PNG + build classification report
tools/make_plan.py build an HD upscale plan from the report
tools/decode_dat.py decode/encode the XOR-obfuscated Fonts.dat / *Description.dat
tools/fontparse.py parse Fonts.dat into font blocks and glyph rects
tools/add_section.py add an executable section to the game PE
tools/apply_cjk.py apply the double-byte font-rendering patch
tools/build_cjk.py build the 2048x1024 UI font atlas + cjk_glyph/cjk_metric tables
tools/cn_strings.py simplified-Chinese translation table (Id -> text)
tools/make_cn_strings.py patch the English column of Strings.dat to GB2312
tools/install_cjk.py deploy/restore the whole patch into the game folder
tools/xrefs.py find call/jmp xrefs in the game executable

See docs/ for the reverse-engineered formats and addresses.

No game data is distributed here. Patches are produced by the user against their own copy.