REDIVIVUS

Proposals / #1122

Model Q05_ActiveFilter as a four-byte logical result

checked · by Commit-Will · submitted 2026-11-03

The current Mac model returns one-byte bool. The complete 72-byte native function instead locally forms a full EAX logical result: MOV AL,1 at0021e174 or XOR AL,AL at0021e17e reaches MOVZX EAX,AL at0021e180 before the sole normal RET0021e187. Conservative fixed points retain every conditional edge and the loop backedge; arbitrary entry/memory values still yield full EAX0/1 on every normal return. Under row46, use the existing four-byte BOOL typedef. Preserve all five typed formals, including unused Stack0x10/0x14, all three locals, names/storage/ordinal/arity and existing cdecl/noVarArgs. No caller/helper/global or historical original-typedef assertion is needed.

Changes 1, applied together

  1. Set prototype mac 0x0021e140

    signaturebool Q05_ActiveFilter(D2QuestDataStrc * pQuestData, int32_t nTargetClassId, D2UnitStrc * pUnit, D2BitBufferStrc * pBitBuffer, D2UnitStrc * pUnitEx)→BOOL Q05_ActiveFilter(D2QuestDataStrc * pQuestData, int32_t nTargetClassId, D2UnitStrc * pUnit, D2BitBufferStrc * pBitBuffer, D2UnitStrc * pUnitEx)
    convention__cdecl