>>211
it depends on code actually. Sometimes it just an sign removal to normalize a formula sometimes its a switch to positive(backwards to NEG)
In this the negative indexes for pallette get converted to unsigned positive bytes from -1 to 1 into 0 to 255
d1=(abs(temp1+(temp1&1)-rep1)*maxcolor)
d2=(abs(temp2+(temp2&1)-rep2)*maxcolor)
d3=(abs(temp3+(temp3&1)-rep3)*maxcolor)
d4=(abs(temp4+(temp4&1)-rep4)*maxcolor)
d5=(abs(temp5+(temp5&1)-rep5)*maxcolor)
d6=(abs(temp6+(temp6&1)-rep6)*maxcolor)
d7=(abs(temp7+(temp7&1)-rep7)*maxcolor)
d8=(abs(temp8+(temp8&1)-rep8)*maxcolor)