REDIVIVUS

Proposals / #1210

Mac OBJECT_SelectRandomShrineType: int32_t __fastcc (pGame, byShrineCategory, nLevelId, pRoom)

approved · by KierTaylor · submitted 2026-11-05, approved 2026-11-05

Mac 0x001ec7f1 is "undefined (void)", convention unknown. Entry: ECX saved to [EBP-0x14] and passed as pGame to GetShrinesRng (0x001f5980) and GetObjectControlSeed (0x001f5972); EBX=EDX used as a byte category (CMP BL,4 / TEST BL,BL, clamped to 2). Stack: [EBP+8] compared against the picked shrine record's +0xb4 threshold (0x001ec898), [EBP+0xc] passed as GetObjectControlSeed's second argument (0x001ec839). Returns ESI (shrine index) in EAX; plain RET. Same four values as Windows twin 0x0054f770 int32_t (pGame, uint32_t nLevelId, byte byShrineCategory, D2RoomStrc* pRoom), in Mac register order.

Changes 1, applied together

  1. Set prototype mac 0x001ec7f1

    signatureundefined OBJECT_SelectRandomShrineType(void)→int32_t OBJECT_SelectRandomShrineType(D2GameStrc * pGame, uint8_t byShrineCategory, uint32_t nLevelId, D2RoomStrc * pRoom)
    conventionunknown→__fastcc