mirror of
https://github.com/thepigeongenerator/mcaselector-lite.git
synced 2025-12-16 19:25:46 +01:00
add copyright information and code cleanup
This commit is contained in:
@@ -1,3 +1,5 @@
|
|||||||
|
# Copyright (c) 2025 Quinn
|
||||||
|
# Licensed under the MIT Licence. See LICENSE for details
|
||||||
---
|
---
|
||||||
# ---------------------------
|
# ---------------------------
|
||||||
# general style settings
|
# general style settings
|
||||||
|
|||||||
@@ -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
3
.github/Dockerfile
vendored
@@ -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
|
||||||
|
|||||||
2
.github/workflows/ci.yaml
vendored
2
.github/workflows/ci.yaml
vendored
@@ -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:
|
||||||
|
|||||||
2
.github/workflows/release.yaml
vendored
2
.github/workflows/release.yaml
vendored
@@ -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
3
.gitignore
vendored
@@ -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
|
||||||
.*
|
.*
|
||||||
|
|
||||||
|
|||||||
3
makefile
3
makefile
@@ -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
|
||||||
|
|||||||
@@ -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;
|
||||||
|
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
@@ -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
|
||||||
|
|||||||
10
src/error.h
10
src/error.h
@@ -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)
|
||||||
|
|||||||
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user