Files
d2r-mobile/docs
f7aafc61bc Android: "Item notes and old names" takes effect after a restart, as on iOS (#191) (#210)
The switch goes through the overlay: gen_romfs_overlay.py writes a complete overlay
per switch combination next to the base one (overlay_variants/item_notes: the item,
rune, area, monster and shrine strings with notes and old names, plus the text-box
table), and the iOS App picks the matching one at start (main.m). Android had no such
step: d2rm_android.py packed only out/, shaders/ and overlay/, and jni_android.c always
used overlay/. So on Android the switch changed only the monster resistances added at
run time, and "on, restart" looked like nothing happened.

- d2rm_android.py puts overlay_variants/ into the Android import pack (HarmonyOS packs
  unchanged).
- DmActivity imports it as an optional item: older packs without it still import, and a
  stale copy is removed when a new pack has none.
- jni_android.c picks, as iOS does, the variant whose key set equals the switches that are
  on (read from sw_custom.txt next to the save directory, before the host starts), checks
  its own overlay.manifest, and sets DM_ROMFS_OVERLAY to "variant:overlay": the game data
  comes from the variant, the touch art is only in overlay/ and is found through the
  second layer. Everything off, no variants, no matching combination or a bad manifest:
  overlay/ as before.
- docs/ANDROID.md and dm/android/README.md (both languages) list the new folder.

Co-authored-by: Yuechuan Yang <22333122+yyan160@users.noreply.github.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
2026-11-01 19:20:14 +08:00
..