init: it boots

This commit is contained in:
Karina
2025-12-21 03:49:12 +04:00
commit bce8adb119
28 changed files with 4587 additions and 0 deletions
+8
View File
@@ -0,0 +1,8 @@
#ifndef MEMORY_H
#define MEMORY_H
#include "types.h"
void *memset(void *ptr, int value, usize num);
#endif
+30
View File
@@ -0,0 +1,30 @@
#ifndef SHITGUI_H
#define SHITGUI_H
#include "types.h"
typedef struct {
volatile u32 *fb;
u32 width;
u32 height;
u32 pitch;
} SG_Context;
typedef struct {
u32 x;
u32 y;
} SG_Point;
typedef struct {
u32 *buffer;
u32 height;
u32 width;
} SG_Image;
typedef struct {
u32 font_w;
u32 font_h;
} SG_FontMetrics;
void sg_put_img(SG_Context *ctx, SG_Point *p, SG_Image *img);
void sg_draw_rect(SG_Context *ctx, SG_Point *p, u32 w, u32 h, u32 color);
#endif
+17
View File
@@ -0,0 +1,17 @@
#ifndef TYPES_H
#define TYPES_H
typedef unsigned _BitInt(8) u8;
typedef unsigned _BitInt(16) u16;
typedef unsigned _BitInt(32) u32;
typedef unsigned _BitInt(64) u64;
typedef signed _BitInt(8) i8;
typedef signed _BitInt(16) i16;
typedef signed _BitInt(32) i32;
typedef signed _BitInt(64) i64;
typedef u64 usize;
typedef u64 uintptr_t;
#endif