Add Framebuffer object
This commit is contained in:
1 parent
15559b0a56
commit
c3ead56582
2 files changed
+63
-1
No files matched your search
+7
-1
@@ -5,9 +5,12 @@ module hulk.hulk;
|
||||
|
||||
import hulk.header;
|
||||
import hulk.bootinfo;
|
||||
import hulk.framebuffer;
|
||||
import hos.memory;
|
||||
import ldc.attributes;
|
||||
|
||||
private __gshared Framebuffer fb;
|
||||
|
||||
extern extern(C) __gshared ubyte _hulk_total_size;
|
||||
|
||||
@(ldc.attributes.section(".hulk_header"))
|
||||
@@ -23,9 +26,12 @@ private __gshared Header hulk_header = {
|
||||
*/
|
||||
extern(C) void hulk_start(ulong rdi, ulong rsi, ulong rdx, BootInfo * bootinfo)
|
||||
{
|
||||
fb.initialize(bootinfo.fb.buffer, bootinfo.fb.width, bootinfo.fb.height, bootinfo.fb.stride);
|
||||
fb.clear(0xFF8800u);
|
||||
|
||||
for (size_t y = 100u; y < 120u; y++)
|
||||
{
|
||||
memset32(&bootinfo.fb.buffer[y * bootinfo.fb.stride + 20u], 0xFF8800u, 20u);
|
||||
memset32(&bootinfo.fb.buffer[y * bootinfo.fb.stride + 20u], 0x001199u, 20u);
|
||||
}
|
||||
|
||||
for (;;)
|
||||
|
||||
Reference in new issue
Block a user