better gcc and types.h

This commit is contained in:
2025-06-03 22:40:07 +02:00
parent 19ade556b6
commit 5ca191d14f
5 changed files with 23 additions and 19 deletions
-1
View File
@@ -1,4 +1,3 @@
build
*.o
.vscode
*.bmp
+2 -4
View File
@@ -3,7 +3,5 @@ clean:
rm -rf build
build:
mkdir -p build && \
cd build && \
gcc -Wall -c ../src/*.c && \
gcc -Wall -o mg *.o
mkdir -p build
gcc -Wall src/*.c src/*.h -o build/mg
+1 -12
View File
@@ -1,21 +1,10 @@
#include "types.h"
#include <stdio.h>
#include <string.h>
#ifndef ARGS_H
#define ARGS_H
struct Parameters {
unsigned long width;
unsigned long height;
char *file_path;
unsigned int size;
float slope;
float start[3];
float var[3];
};
typedef struct Parameters parameters;
parameters parse_args(int argc, char **argv);
#endif
+2 -2
View File
@@ -1,8 +1,8 @@
#include "types.h"
#ifndef BMP_H
#define BMP_H
typedef void line_fn(unsigned long y, char *data_buffer);
void bmp_generate(unsigned long width, unsigned long height,
unsigned int color_depth, char *file_path,
line_fn generate_line);
+18
View File
@@ -0,0 +1,18 @@
#ifndef TYPES_H
#define TYPES_H
struct Parameters {
unsigned long width;
unsigned long height;
char *file_path;
unsigned int size;
float slope;
float start[3];
float var[3];
};
typedef struct Parameters parameters;
typedef void line_fn(unsigned long y, char *data_buffer);
#endif