mirror of
https://github.com/BoredDevNL/BoredOS.git
synced 2026-05-15 10:48:38 +00:00
logo
This commit is contained in:
parent
05c1f37a86
commit
8d3c0486ff
3 changed files with 37 additions and 24 deletions
BIN
boredos.iso
BIN
boredos.iso
Binary file not shown.
BIN
build/graphics.o
BIN
build/graphics.o
Binary file not shown.
|
|
@ -372,34 +372,47 @@ void graphics_set_bg_image(uint32_t *pixels, int w, int h) {
|
||||||
}
|
}
|
||||||
|
|
||||||
void draw_boredos_logo(int x, int y, int scale) {
|
void draw_boredos_logo(int x, int y, int scale) {
|
||||||
|
// Width: 60, Height: 16
|
||||||
|
// 1: Magenta, 2: Blue, 3: Cyan, 4: White, 0: Deadspace
|
||||||
|
static const uint8_t boredos_bmp[] = {
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,
|
||||||
|
|
||||||
static const uint8_t brewos_bmp[] = {
|
2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,2,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,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0; r < 16; r++) {
|
const int bmp_w = 60;
|
||||||
for (int c = 0; c < 16; c++) {
|
const int bmp_h = 16;
|
||||||
uint8_t p = brewos_bmp[r * 16 + c];
|
|
||||||
if (p == 1) {
|
for (int r = 0; r < bmp_h; r++) {
|
||||||
draw_rect(x + c * scale, y + r * scale, scale, scale, 0xFF1A1A1A); // rgb(26,26,26)
|
for (int c = 0; c < bmp_w; c++) {
|
||||||
} else if (p == 2) {
|
uint8_t p = boredos_bmp[r * bmp_w + c];
|
||||||
draw_rect(x + c * scale, y + r * scale, scale, scale, 0xFFFEFEFE); // rgb(254,254,254)
|
if (p == 0) continue;
|
||||||
|
|
||||||
|
uint32_t color = 0;
|
||||||
|
switch(p) {
|
||||||
|
case 1: color = 0xFFB589D6; break; // Magenta
|
||||||
|
case 2: color = 0xFF569CD6; break; // Blue
|
||||||
|
case 3: color = 0xFF4EC9B0; break; // Cyan
|
||||||
|
case 4: color = 0xFFFFFFFF; break; // White
|
||||||
}
|
}
|
||||||
|
|
||||||
|
draw_rect(x + (c * scale), y + (r * scale), scale, scale, color);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue