Mac LinkPortal: D2UnitStrc* __cdecl 5-arg prototype (pGame, pOwner, pUnit, eLevel, eLevelId)
Mac 0x0026cc16 is "undefined (void)", convention unknown. Reads [EBP+8] (pGame, 0x0026cc39), [EBP+0x10] (pUnit, 0x0026cc81), [EBP+0x14] (passed to GetActNoFromLevelNumber(eD2LevelId) at 0x0026cc2e), [EBP+0x18] (passed as eLevelId to IsPortalFromDuriel at 0x0026ccac); [EBP+0xc] unused (OBJMODE_CreateRedPortal passes 0 there); plain RET 0x0026cf5a. Both callers store 5 dwords [ESP]..[ESP+0x10] and test the returned EAX as a pointer (MOV ESI,EAX; TEST ESI,ESI; then pass it to 0x001915cf). Windows twin 0x0056cf40 is D2UnitStrc* LinkPortal(pGame, pOwner, pUnit, D2RoomStrc* eLevel, eD2LevelId nLevelId2); on Mac the 4th arg is a level id, not a room.
Changes 1, applied together
Set prototype
mac 0x0026cc16signatureundefined LinkPortal(void)→D2UnitStrc * LinkPortal(D2GameStrc * pGame, D2UnitStrc * pOwner, D2UnitStrc * pUnit, eD2LevelId eLevel, eD2LevelId eLevelId)conventionunknown→__cdecl