SmallBASIC icon indicating copy to clipboard operation
SmallBASIC copied to clipboard

Problem with big hex numbers in windows

Open Joe7M opened this issue 3 years ago • 0 comments

I was creating images from arrays with transparency: color = (transparency lshift 24) - rgb(r,g,b)

Instead of "transparency lshift 24" I wanted to use hex numbers. I realized, that in Linux everything is fine, but in Windows the colors are messed up. Reason is, that big hex numbers in windows don't work.

Linux: print 255 lshift 24 'Output: 4278190080 print 0xFF000000 'Output: 4278190080

Windows: print 255 lshift 24 'Output: 4278190080 print 0xFF000000 'Output: -16777216

tested with SDL version sbasicg 12.24 64bit

Joe7M avatar Jul 02 '22 18:07 Joe7M