10-26-2022, 07:20 PM
(This post was last modified: 10-27-2022, 06:18 PM by mnrvovrfc.
Edit Reason: Had written "&HB" instead of "&B" which is incorrect for binary notation.
)
(10-26-2022, 04:47 PM)James D Jarvis Wrote: I like old-school graphics. A lot more creative work is required to make a block of 20 pixels look like and alien invader (for example).Also I would have to change "num" type to "LONG". Otherwise it's just "&B" logic which is reversed. The "units" place always controls the pixel in the top-left corner. Just draw it on 5x4 grid with zeroes and ones, put it in a single line, reverse it and put "&B" in front of it and use it as parameter to "VAL()" function.
I say again, as it stands it would accept only blocks of up to 16 pixels within because the first parameter to "block" sub is 16-bit integer and not 32-bit.
EDIT: Sorry about confusing people here! It's "&B" not "&HB", for the latter was actually creating a hexadecimal number! Tripped upon this while creating the example program below. Again I ask apologies for the confusion this might have caused.