equal
deleted
inserted
replaced
598 // Created by Darkvater.. blame him if it is wrong ;) |
598 // Created by Darkvater.. blame him if it is wrong ;) |
599 // Btw, the macro FINDFIRSTBIT is better to use when your value is |
599 // Btw, the macro FINDFIRSTBIT is better to use when your value is |
600 // not more than 128. |
600 // not more than 128. |
601 byte i = 0; |
601 byte i = 0; |
602 if (value & 0xffff0000) { value >>= 16; i += 16; } |
602 if (value & 0xffff0000) { value >>= 16; i += 16; } |
603 if (value & 0x0000ff00) { value >>= 8; i += 8; } |
603 if (value & 0x0000ff00) { value >>= 8; i += 8; } |
604 if (value & 0x000000f0) { value >>= 4; i += 4; } |
604 if (value & 0x000000f0) { value >>= 4; i += 4; } |
605 if (value & 0x0000000c) { value >>= 2; i += 2; } |
605 if (value & 0x0000000c) { value >>= 2; i += 2; } |
606 if (value & 0x00000002) { i += 1; } |
606 if (value & 0x00000002) { i += 1; } |
607 return i; |
607 return i; |
608 } |
608 } |
609 |
609 |
610 //!We're writing an own sort algorithm here, as |
610 //!We're writing an own sort algorithm here, as |