: 2. How do I write to bytes to memory correctly. The origanal drawpixel uses 
: a pixel value c as well as the x and y cords. And therefor the hline uses 
: this c as well.
: 
: It does:-
:     if(c)
:         ORBYTE_FP(dst, mask);
:     else ANDBYTE_FP(dst, ~mask);
: 
: What is the pixelvaue "c" for? Who gave greg that code? Greg?

        In the MicroWindows/Nano engine, there are color values (COLORVAL)
and pixel values (PIXELVAL).  COLORVALs are now always 32 bits, and hold the
RGB color we're looking to see.  After translation by the palette manager section
of devdraw.c, the color value is converted into a device-dependent PIXELVAL
that is essentially an index into the video card's palette, *or* the hardware RGB
value, if the card is truecolor.

        Translated, for you the pixelval is either 0 or 1 (black or white), since 
you're running a
monochrome screen.  So, if c == 1, then you OR a bit into screen ram,
else you AND out (set to 0) a bit.

Good luck.  Remember, the code you're running now is based on Jacob's code,
and we want to add the horizontal byte-filling code that Bjorn sent us.

Greg

: 

Reply via email to