15.03.2016, 19:16
updated (faster)
Added new macros:
Function SetCellValue and GetCellValue
They are used to manipulate the n bit cells
Example:
PHP Code:
SetValueBit(&value, bit, power); //power 0 or 1
PHP Code:
SetValueBitTrue(&value, bit);
SetValueBitFalse(&value, bit);
SetCellValue(&value, cellid, mode, power);
GetCellValue(value, cellid, mode);
MergeValueEx(byte1, byte2, byte3, byte4);
Float:MergeFloatEx(byte1, byte2, byte3, byte4);
They are used to manipulate the n bit cells
Example:
PHP Code:
printf("%d, %d",GetCellValue(0x89ABCDEF,1,3),GetCellValue(0x89ABCDEF,1,8));
//print: 5, 205
//mode 3: 10 001 001 101 010 111 100 110 111 101 111 <-- cell id 0
//cell id 1 = 0b101 = 5
//mode 8: 10001001 10101011 11001101 11101111 <-- cell id 0
//cell id 1 = 0b11001101 = 205