nen
2011-12-27 05:45:10
I have been reading over MSI's code but I have no idea what averagePixelShift. Could someone please explain exactly how it works?
^ Taken from MSI if someone wants to reference it.
function MSI_IsAnimating(Anim: TAnimation): Boolean;
var
avg: integer;
begin
with Anim do
begin
avg := averagePixelShift(pixelBox, interval, maxTime);
result := inRange(avg, minPixelShift, maxPixelShift);
MSI_SubDebug('Average pixel shift: ' + intToStr(avg));
if (result) then
MSI_SubDebug('Player animation: ' + anim.name);
end;
end; ^ Taken from MSI if someone wants to reference it.