Type Mac AnimData lookup as a writable name to animation-record operation
Ghidra vmac 105 · 3bccb89
Mac 00139e8d receives a writable character name in ECX and returns D2AnimDataRecordStrc* or null. Its complete 239-byte body uppercases individual bytes, hashes the terminated name, reads a bucket count, starts at bucket+4 and advances records by 160 bytes. Its return slot is initialized to 0 and only replaced by the matched record address. Constructor 00139c96 independently builds 256 buckets as cursor += 4 + count*160 in a 1188-byte table. The existing record is 160 bytes: name+0/8, frame count+8, speed+12 and 144 flag bytes+16. Both Mac callers use that contract, including the typed unit getter which forwards success or table+0x404. Correct the return and input together, retaining pnParam, ECX fastcc storage and all locals. Complete paired Windows body, all callers, constructors, original Windows bytes and independent Mac bytes verified. Windows custom-EBX prototype and missing Mac bucket/shared-field changes remain held. Static verification only.
Changes 1, applied together
Set prototype
mac 0x00139e8dsignatureint * ANIMDATA_GetRecordByNameHash(int * pnParam)→D2AnimDataRecordStrc * ANIMDATA_GetRecordByNameHash(char * pnParam)convention__fastcc