asyade
Tu devrais pas abandonner pour si peut, en autoit si je me souviens bien tu n´a pas directement d´opérateur sur les byte ( "<<" , "&") il faut utiliser les fonctions BitAND et BitSHIFT sa fais tellement longtemps que j´ais pas toucher autoit je te ferais pas un exemple mais franchement rien de plus simple
merci ! du coup grâce a toi j'ai résolut une partie mais je bloque pour le Y
la map est 84805126 = -3 -16
Il me renvoit bien -3 en X
mais 6 en Y why ?
code
Cliquez pour révéler
Cliquez pour masquer
#include <MsgBoxConstants.au3>
$m_x = 0
X()
Func X()
$m_x = BitAND(84805126 , 0x3FE00); // 9 higher bits
$m_x = BitShift($m_x,9)
if BitAND($m_x, 0x100) == 0x100 Then ;9th bit is the sign. 1 means its minus
$m_x = -BitAND( $m_x,0xFF); // just take the 8 first bits and take the opposite number
Return $m_x
EndIf
EndFunc
$m_y = 0
Y()
Func Y()
$m_y = BitAND(84805126 , 0x01FF); // 9 higher bits
if BitAND($m_y, 0x100) == 0x100 Then ;9th bit is the sign. 1 means its minus
$m_y = -BitAND( $m_y,0xFF); // just take the 8 first bits and take the opposite number
Return $m_y
EndIf
EndFunc
MsgBox($MB_SYSTEMMODAL, "Title", $m_x & " " & $m_y, 10)