"""Decode the localized string tables and build the dialogue subtitle table. Text resources are ``0DRP`` logical resources (docs/page_directory.md) whose payload holds a hash table, an index array and a string blob. A descriptor in the resource locates the three; all pointers are ``0x5xxxxxxx`` resource pointers whose low 28 bits are offsets into the logical resource (the ``0DRP`` stream joined with its 64 KiB continuation streams): ``` descriptor ptr index | u32 | u32 0x10 | ptr | 01 01 00 00 | u32 hash_bytes | ptr hash | u32 0x10 | u32 blob_bytes | ptr blob | ... more 16-byte entries hash entry 16 bytes: u32 joaat(lowercase label), u32 0, u8 1, u8[2], u24 index (at +11), u8 index entry 16 bytes: u64, u64 (blob offset << 20 | flags, blob chunk = flags & 3) blob NUL-terminated UTF-8 strings, in one or more chunks ``` From the blob entry on, the descriptor is a run of 16-byte entries (u32 tag, u32 bytes, pointer). A blob of more than 1 MiB is split into several tag-0x10 chunks, and an index entry names its chunk in its low bits (docs/text.md). Conversation data pairs a dialogue key with its line labels as ``AU_\\0