Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Drawing on the Array to be PUT
#1
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.
Reply
#2
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 Wink
Reply
#3
Chaos, 1 byte per pixel is for VGA, but isn't it 4 bits (16 colors) per pixel for EGA?
Reply
#4
No idea. You'd have to be high to use EGA, it's 2006 =)
Reply
#5
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.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)