Code: Select all
c := NumGet(bits.Scan0 + (y) * bits.Stride + (x) * 4, "uint")
; debug:
c2 := NumGet(bits.Scan0, "uint")
n1 := (y) * bits.stride
n2 := (x) * 4
c2 := c2 + n1 + n2
What happens when things are summed inside of a NumGet like that?
bits.Scan0 is a unsigned_char*
bits.Stride, x, y are ints
Im trying to reproduce this ahk script into c++, but the value im getting on test is the same as of c2 and not c
Code: Select all
unsigned int value = *(unsigned int*)(this->bits.Scan0);
unsigned int test = (value + (y) * this->bits.Stride + (x) * 4);