Mac: companions to applied Windows retypes (client, unit and items.txt parameters), retype only
Ghidra vmac 110 · 9528519
Reworked resubmission of #425, #426 and #459 after review. Dropped: the two DAMAGE_RemoveDamageListEntry ops (already in #293) and CLIENT_RemoveFromAdjacentRooms (reviewer wants a dereference proof). Kept, now that the Windows twins are applied (#414, #417, #421, #458): NpcStateIsntZero; DRLGROOM_Add/RemoveClientFromRoom (stored into / compared with pRoom->pClients); Q32_CheckWussieBarricade, Q32_FindBarricadePortal and Q32_IncrementWussieKillCount (the value is passed to Q32_FindBarricadeGroup as a unit; generic nParam renamed pUnit); TEXT_OpenQuestScroll (unit read at +0xc; Stack[0x8] compared at +0x80 with 'bkd ' = D2ItemsTxt.dwCode); SUNITPROXY_SendProxyItemsToClient (Stack[0xc] cast to D2UnitStrc * for GetPlayerProxyInventory). Renames of chosen names are refused by the checker and requested in a separate GitHub issue. __cdecl, plain stack slots; Mac decompiles only.
Changes 11, applied together
Retype variable
mac 0x001d93ef Stack[0x8]typeint32_t→D2UnitStrc *Retype variable
mac 0x00165df9 Stack[0x8]typeint32_t→D2ClientStrc *Retype variable
mac 0x00165fb1 Stack[0x8]typeint32_t→D2ClientStrc *Retype variable
mac 0x0023c1f1 Stack[0x8]typeint32_t→D2UnitStrc *Rename variable
mac 0x0023c1f1 Stack[0x8]namenParam→pUnitRetype variable
mac 0x0023caf7 Stack[0x8]typeint32_t→D2UnitStrc *Rename variable
mac 0x0023caf7 Stack[0x8]namenParam→pUnitRetype variable
mac 0x0023c246 Stack[0xc]typeint32_t→D2UnitStrc *Retype variable
mac 0x000f35f7 Stack[0x4]typeint32_t→D2UnitStrc *Retype variable
mac 0x000f35f7 Stack[0x8]typeint32_t→D2ItemsTxt *Retype variable
mac 0x0028c9b3 Stack[0xc]typeint32_t→D2UnitStrc *