add copyright information and code cleanup

This commit is contained in:
2025-06-15 14:29:28 +02:00
parent efcc02248f
commit 6997e08b05
12 changed files with 34 additions and 5 deletions

View File

@@ -1,3 +1,5 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
--- ---
# --------------------------- # ---------------------------
# general style settings # general style settings

View File

@@ -1,3 +1,6 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
[*] [*]
charset = utf-8 charset = utf-8
end_of_line = lf end_of_line = lf

3
.github/Dockerfile vendored
View File

@@ -1,3 +1,6 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
# docker buildx build . -t ghcr.io/thepigeongenerator/mcaselector-lite:latest # docker buildx build . -t ghcr.io/thepigeongenerator/mcaselector-lite:latest
# docker push ghcr.io/thepigeongenerator/mcaselector-lite:latest # docker push ghcr.io/thepigeongenerator/mcaselector-lite:latest
FROM debian:testing-slim FROM debian:testing-slim

View File

@@ -1,3 +1,5 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
name: CI name: CI
on: on:
push: push:

View File

@@ -1,3 +1,5 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
name: release name: release
on: on:
release: release:

3
.gitignore vendored
View File

@@ -1,3 +1,6 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
# ignore all dotfiles by default # ignore all dotfiles by default
.* .*

View File

@@ -1,3 +1,6 @@
# Copyright (c) 2025 Quinn
# Licensed under the MIT Licence. See LICENSE for details
# dependencies: # dependencies:
# - make # - make
# - C compiler # - C compiler

View File

@@ -1,3 +1,6 @@
// Copyright (c) 2025 Quinn
// Licensed under the MIT Licence. See LICENSE for details
#version 330 core #version 330 core
out vec4 colour; out vec4 colour;

View File

@@ -1,3 +1,6 @@
// Copyright (c) 2025 Quinn
// Licensed under the MIT Licence. See LICENSE for details
#version 330 core #version 330 core
layout(points) in; layout(points) in;
layout(triangle_strip, max_vertices = 4) out; // output the vertices of this rectangle layout(triangle_strip, max_vertices = 4) out; // output the vertices of this rectangle

View File

@@ -1,3 +1,6 @@
// Copyright (c) 2025 Quinn
// Licensed under the MIT Licence. See LICENSE for details
#version 330 core #version 330 core
layout(location = 0) in ivec4 rect; // rectangle data layout(location = 0) in ivec4 rect; // rectangle data
uniform ivec2 screen; // current screen dimensions uniform ivec2 screen; // current screen dimensions

View File

@@ -2,6 +2,10 @@
// Licensed under the MIT Licence. See LICENSE for details // Licensed under the MIT Licence. See LICENSE for details
#pragma once #pragma once
#if __INCLUDE_LEVEL__ > 0
#include <stdio.h>
#endif
#define ERROR_STR_PRE(v) #v #define ERROR_STR_PRE(v) #v
#define ERROR_STR(v) ERROR_STR_PRE(v) #define ERROR_STR(v) ERROR_STR_PRE(v)
@@ -10,8 +14,8 @@
#define warn(s, ...) fprintf(stderr, "\033[93m" __FILE__ ":" ERROR_STR(__LINE__) ": [WAR]: " s "\033[0m\n", ##__VA_ARGS__) #define warn(s, ...) fprintf(stderr, "\033[93m" __FILE__ ":" ERROR_STR(__LINE__) ": [WAR]: " s "\033[0m\n", ##__VA_ARGS__)
#define error(s, ...) fprintf(stderr, "\033[91m" __FILE__ ":" ERROR_STR(__LINE__) ": [ERR]: " s "\033[0m\n", ##__VA_ARGS__) #define error(s, ...) fprintf(stderr, "\033[91m" __FILE__ ":" ERROR_STR(__LINE__) ": [ERR]: " s "\033[0m\n", ##__VA_ARGS__)
#define fatal(s, ...) \ #define fatal(s, ...) \
do { \ do { \
printf("\033[101m" __FILE__ ":" ERROR_STR(__LINE__) ": [FAT]: " s "\033[0m\n", ##__VA_ARGS__); \ printf("\033[101m" __FILE__ ":" ERROR_STR(__LINE__) ": [FAT]: " s "\033[0m\n", ##__VA_ARGS__); \
exit(1); \ exit(1); \
} while (0) } while (0)

View File

@@ -6,8 +6,6 @@
#include <GLFW/glfw3.h> #include <GLFW/glfw3.h>
#include <assert.h> #include <assert.h>
#include <stdio.h>
#include <stdlib.h>
#include "../error.h" #include "../error.h"
#include "input.h" #include "input.h"