REDIVIVUS

Proposals / #826

Mac: companions to Windows #817 and #819 (pet-type index and hireable flag in the pet helpers)

applied · by Captain-Fwiffo · submitted 2026-11-02, applied 2026-11-02

Ghidra vmac 110 · 9528519

Mac twins of two pending Windows proposals with the same bodies. PETS_UpdatePetData: nParam is bounds-checked against the pet type table size and used to index pPlayerData->pPets->pPetList, so it is the pet type index; retyped to ePetType (4-byte enum, present on Mac) and renamed nPetType, as in #817. PETS_FreeOrKillPetList: nParam1 selects the hireling path (0 calls KillHandlerPet, nonzero removes the pet from the room, as in the Windows body); renamed bIsHireable following #819, whose Windows callers build it as (petType == PETTYPE_hireable). The Mac callers were not read. Both parameter names are the generic nParam/nParam1, so the renames are allowed.

Changes 3, applied together

  1. Retype variable mac 0x001f9eb9 Stack[0x8]

    typeint32_t→ePetType
  2. Rename variable mac 0x001f9eb9 Stack[0x8]

    namenParam→nPetType
  3. Rename variable mac 0x001f9038 Stack[0x8]

    namenParam1→bIsHireable