ChibraxOS 2

Changes:
- kernel 6.0.2
- Broken init scripts
- Switch to bun for better peroformance an easier ffi
- Removed grup
- Efi support without graphics (at least graphics werent tested)
- Suppression de toutes les dépendance non libc
- new splash
- broken audio
- typescript support
- ls rewritten to be more reliable
This commit is contained in:
Marc
2022-10-22 13:47:33 +02:00
parent db49f8d205
commit 721c919c7b
76 changed files with 2485 additions and 2665 deletions
+7 -10
View File
@@ -3,7 +3,7 @@
* DICKPICK is a image drawing library
*/
const graphics = require('../../core/graphics')
import * as graphics from '../../core/graphics'
/**
* @param { number } x
@@ -12,7 +12,7 @@ const graphics = require('../../core/graphics')
* @param { number } dy length on the y axis
* @param { string } color
*/
function drawRect(x, y, dx, dy, color) {
export function drawRect(x, y, dx, dy, color) {
const bitmap = {
data: Buffer.alloc(dx*dy*4, Buffer.from(graphics.parseHexColor(color))),
width: dx,
@@ -28,7 +28,7 @@ function drawRect(x, y, dx, dy, color) {
* @param { number[] } color
* @returns { Pencil }
*/
function pencilFromBitmap(Bitmap, color) {
export function pencilFromBitmap(Bitmap, color) {
return { ...Bitmap, color }
}
@@ -37,7 +37,7 @@ function pencilFromBitmap(Bitmap, color) {
* @param { number } height
* @returns
*/
function createBitmap(width, height) {
export function createBitmap(width, height) {
const data = Buffer.alloc(width * height * 4, Buffer.from([0, 0, 0, 0]));
return { width, height, data }
}
@@ -47,7 +47,7 @@ function createBitmap(width, height) {
* @param { number } x
* @param { number } y
*/
function setPixel(pencil, x, y) {
export function setPixel(pencil, x, y) {
pencil.data.set(pencil.color, y*pencil.width*4 + x*4)
}
@@ -60,7 +60,7 @@ function setPixel(pencil, x, y) {
* @param { number } yc
* @param { Pencil } pencil
*/
function symetrie8Axes(xc, yc, x, y, pencil) {
export function symetrie8Axes(xc, yc, x, y, pencil) {
setPixel(pencil, x+xc, y+yc)
setPixel(pencil, x+xc,-y+yc)
setPixel(pencil, -x+xc,-y+yc)
@@ -78,7 +78,7 @@ function symetrie8Axes(xc, yc, x, y, pencil) {
* @param { number } yc
* @param { number } r
*/
function drawCircle(pencil, xc, yc, r) {
export function drawCircle(pencil, xc, yc, r) {
let x = 0
let y = r
let d = 3 - (2 * r);
@@ -96,6 +96,3 @@ function drawCircle(pencil, xc, yc, r) {
symetrie8Axes(xc, yc, x, y, pencil);
}
}
module.exports = { drawRect, setPixel, pencilFromBitmap, createBitmap, drawCircle }