summaryrefslogtreecommitdiff
path: root/kernel/main.c
blob: 86b095dc2762875617d9fea0220c827d1a214c4d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
#include <stdint.h>
#include <multiboot2.h>
#include <graphics.h>
#include <debug.h>

int kernel_main(mb2_tag_header* multiboot_bootinfo, uint32_t multiboot_magic)
{
	init_fb(multiboot_bootinfo, multiboot_magic);

	for (int x = 0; x < fb.width; x++) {
		for (int y = 0; y < fb.width; y++) {
			fb_draw_pixel(fb, x , y, BLUE);
		}
	}

	fb_draw_line(fb, 0, 0, 100, 100, WHITE);
	fb_draw_line(fb, 0, 0, 100, 200, WHITE);
	fb_draw_line(fb, 0, 0, 100, 300, WHITE);

	fb_draw_line(fb, 100, 100, 200, 200, YELLOW);
	fb_draw_line(fb, 100, 100, 300, 200, YELLOW);
	fb_draw_line(fb, 100, 100, 400, 200, YELLOW);

	fb_draw_line(fb, 500, 100, 300, 500, RED);
	fb_draw_line(fb, 300, 500, 700, 500, RED);
	fb_draw_line(fb, 700, 500, 500, 100, RED);

	fb_draw_string(fb, "aleksa vuckovic 1234", 420, 300, WHITE, BLUE);

	return 0;
}