mirror of
https://git.shylie.info/shylie/terml.git
synced 2024-11-24 17:01:05 +00:00
Fix bg color get
This commit is contained in:
parent
f032b15b3e
commit
c949dbb9d9
@ -57,19 +57,19 @@ char terml::get(unsigned int x, unsigned int y, int* fg, int* bg) const
|
|||||||
if (bg)
|
if (bg)
|
||||||
{
|
{
|
||||||
const unsigned char r =
|
const unsigned char r =
|
||||||
(buffer[offset * CELL_SIZE + 26] - '0') +
|
(buffer[offset * CELL_SIZE + 28] - '0') +
|
||||||
(buffer[offset * CELL_SIZE + 27] - '0') * 10 +
|
(buffer[offset * CELL_SIZE + 27] - '0') * 10 +
|
||||||
(buffer[offset * CELL_SIZE + 28] - '0') * 100;
|
(buffer[offset * CELL_SIZE + 26] - '0') * 100;
|
||||||
|
|
||||||
const unsigned char g =
|
const unsigned char g =
|
||||||
(buffer[offset * CELL_SIZE + 30] - '0') +
|
(buffer[offset * CELL_SIZE + 32] - '0') +
|
||||||
(buffer[offset * CELL_SIZE + 31] - '0') * 10 +
|
(buffer[offset * CELL_SIZE + 31] - '0') * 10 +
|
||||||
(buffer[offset * CELL_SIZE + 32] - '0') * 100;
|
(buffer[offset * CELL_SIZE + 30] - '0') * 100;
|
||||||
|
|
||||||
const unsigned char b =
|
const unsigned char b =
|
||||||
(buffer[offset * CELL_SIZE + 34] - '0') +
|
(buffer[offset * CELL_SIZE + 36] - '0') +
|
||||||
(buffer[offset * CELL_SIZE + 35] - '0') * 10 +
|
(buffer[offset * CELL_SIZE + 35] - '0') * 10 +
|
||||||
(buffer[offset * CELL_SIZE + 36] - '0') * 100;
|
(buffer[offset * CELL_SIZE + 34] - '0') * 100;
|
||||||
|
|
||||||
*bg = (r << 16) | (g << 8) | b;
|
*bg = (r << 16) | (g << 8) | b;
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user