12-24-2024, 08:55 AM
I have a listing (N5 or N6 ?) for a sprite editor that I am trying to convert to N7.
There is a command that is used in converting the colour detected by the mouse into an RGB format... That command is 'SHR' (SHift register Right).
Reason: Using pixeli(x, y), to detect the colour, produces a number like:
black = 4278190080
white = 4294967295
red = 4294901760
green = 4278255360
blue = 4278190335
To convert to RGB three functions were used: n_c is the colour detected
rem ---------------------------------------------------
rem Convert to RGB format
rem ---------------------------------------------------
function getB(n_c)
return n_c AND 255
endfunc
function getG(n_c)
return (n_c SHR 8) AND 255
endfunc
function getR(n_c)
return (n_c SHR 16) AND 255
endfunc
I need to know if there is a method to replace SHR.
There is a command that is used in converting the colour detected by the mouse into an RGB format... That command is 'SHR' (SHift register Right).
Reason: Using pixeli(x, y), to detect the colour, produces a number like:
black = 4278190080
white = 4294967295
red = 4294901760
green = 4278255360
blue = 4278190335
To convert to RGB three functions were used: n_c is the colour detected
rem ---------------------------------------------------
rem Convert to RGB format
rem ---------------------------------------------------
function getB(n_c)
return n_c AND 255
endfunc
function getG(n_c)
return (n_c SHR 8) AND 255
endfunc
function getR(n_c)
return (n_c SHR 16) AND 255
endfunc
I need to know if there is a method to replace SHR.
Logic is the beginning of wisdom.