Commit Graph

2 Commits

Author SHA1 Message Date
Thomas Huth a3d4e896e5 Set default palette according to "16-color Text Extension" document
The "Open Firmware Recommended Practice: 16-color Text Extension"
document specifies how the first 16 colors of a palette should be
set. So let's use these colors in SLOF, too.
Also move the function for initializing the palette into the
common graphics.fs file so that we do not have to do this change
twice.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2015-03-12 18:25:35 +11:00
Thomas Huth 088baa0de4 Fix rectangle drawing functions to work also with higher bit depths
draw-rectangle, fill-rectangle and read-rectangle were only working
with 8-bit color depth displays so far. This is fixed now for 16-bit,
24-bit and 32-bit color depths, too, by taking the "screen-depth"
into account.
And while we're at it, consolidate all the same copies of these
functions into one common file (graphics.fs) so that we do not
have to do these modifications multiple times in different files.

Signed-off-by: Thomas Huth <thuth@linux.vnet.ibm.com>
Signed-off-by: Nikunj A Dadhania <nikunj@linux.vnet.ibm.com>
2015-03-12 18:25:35 +11:00