| codhexd allows you to convert hexadecimal hex code to a fractional number double (float).
It is used to read numeric values ??from the process memory.
codhexd (#char_hex );
parameter is a pointer to the char array in which the read code from the memory is located using readmemory - Working with process memory. Search, read, write to the memory of the game process
In the char_hex array, 4 hex bytes must be specified, since this function only translates 4 bytes (float).
Attention - in the process memory, bytes are read from right to left. codhexd, as well as codhexi and codhex, are specially sharpened for convenient use for working with processes, so in the char array after reading from the process, you do not need to flip the bytes. Processing is already right from right to left.
However, if you need to use codhexd for the usual conversion of hexadecimal to decimal, you must reverse the hexadecimal bytes. not as we write in the calculator.
Example if you count such a hex code 75 E9 B3 3F, then we get a fractional number of 1.405562.
In program memory, the same number will be written in reverse in the hexadecimal system 3F B3 E9 75. Bytes backwards. Therefore, the function codhexd works with bytes from right to left.
char p ;
p =formatic (63); // 3F
p =formatic (179); // B3
p =formatic (233); // E9
p =formatic (117); // 75
double a=codhexd (#p ); // Convert HEX (75 E9 B3 3F) to decimal fractional 1.405562
The Visual Code Editor is Kibor. Creating bots without knowledge of programming.
Learning function for recognizing text.