From 77afd633c610e8bfde1b66384e9309cdf249ccbb Mon Sep 17 00:00:00 2001 From: DrNuget Date: Wed, 29 Oct 2025 17:57:05 +0200 Subject: initial commit, only boilerplate --- Makefile | 12 ++++++++++++ brailleboi.c | 15 +++++++++++++++ brailleboi.h | 13 +++++++++++++ main.c | 10 ++++++++++ 4 files changed, 50 insertions(+) create mode 100644 Makefile create mode 100644 brailleboi.c create mode 100644 brailleboi.h create mode 100644 main.c diff --git a/Makefile b/Makefile new file mode 100644 index 0000000..ba61ab3 --- /dev/null +++ b/Makefile @@ -0,0 +1,12 @@ +CC = gcc + +CFLAGS = -std=c99 + +SRC = main.c brailleboi.c brailleboi.h + +TARGET = main + +.PHONY: build + +build: + $(CC) $(CFLAGS) -o $(TARGET) $(SRC) diff --git a/brailleboi.c b/brailleboi.c new file mode 100644 index 0000000..a892dfa --- /dev/null +++ b/brailleboi.c @@ -0,0 +1,15 @@ +#include + +#include "brailleboi.h" + +int brailleInit(int width, int height, image_buffer* buf) +{ + buf->contents = malloc((width * height) * sizeof(int)); + buf->width = width; + buf->height = height; +} + +int brailleStop(image_buffer* buf) +{ + free(buf->contents); +} diff --git a/brailleboi.h b/brailleboi.h new file mode 100644 index 0000000..87d3e35 --- /dev/null +++ b/brailleboi.h @@ -0,0 +1,13 @@ +#ifndef BRAILLEBOI_H +#define BRAILLEBOI_H + +typedef struct image_buffer { + int width, height; + int* contents; +} image_buffer; + +int brailleInit(int, int, image_buffer*); + +int brailleStop(image_buffer*); + +#endif diff --git a/main.c b/main.c new file mode 100644 index 0000000..1ba0f64 --- /dev/null +++ b/main.c @@ -0,0 +1,10 @@ +#include +#include "brailleboi.h" + +int main() +{ + image_buffer buf; + brailleInit(20, 20, &buf); + brailleStop(&buf); + return 0; +} -- cgit v1.2.3