SmallBASIC
SmallBASIC copied to clipboard
Problem with big hex numbers in windows
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