This is probably trivial to the veterans, but I've been thinking about manipulating directly the (sprite ) array before it gets PUT. Does anyone use this technique to draw lines, squares, shapes on screen? Is it faster this way, or is it slower because QBasic lacks high-level bitwise operations (am I wrong?)? I will have to have a good understanding of the QBasic image file format, though.
the image is stored like this
first 2 bytes = width * 8
next 2 bytes = height
rest data = one byte per pixel (8-bit)
thats why the size (in 16-bit integers) is ((w * h ) / 2) + 2
Chaos, 1 byte per pixel is for VGA, but isn't it 4 bits (16 colors) per pixel for EGA?
No idea. You'd have to be high to use EGA, it's 2006 =)
Quote:Chaos, 1 byte per pixel is for VGA, but isn't it 4 bits (16 colors) per pixel for EGA?
Most VGA modes resemble the EGA modes in that respect. The 256 color mode is only VGA mode with 8 bit pixel data.